summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-12-21 12:03:03 +0000
committerDuncan Sands <baldrick@free.fr>2012-12-21 12:03:03 +0000
commit6e591ea0b9759ffae3abafb2d55b8d30a20e98f2 (patch)
tree02f1c42baae6a7e7f7a2e9367b8ea84e79177443 /unittests
parent3333e668221f52f8c708df0037ee9c4bf2417929 (diff)
downloadllvm-6e591ea0b9759ffae3abafb2d55b8d30a20e98f2.tar.gz
llvm-6e591ea0b9759ffae3abafb2d55b8d30a20e98f2.tar.bz2
llvm-6e591ea0b9759ffae3abafb2d55b8d30a20e98f2.tar.xz
Test that a landingpad gets the name provided when it was created (see commit
170318). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/VMCore/IRBuilderTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/VMCore/IRBuilderTest.cpp b/unittests/VMCore/IRBuilderTest.cpp
index d1d59c71eb..900e331cbb 100644
--- a/unittests/VMCore/IRBuilderTest.cpp
+++ b/unittests/VMCore/IRBuilderTest.cpp
@@ -99,6 +99,13 @@ TEST_F(IRBuilderTest, CreateCondBr) {
EXPECT_EQ(Weights, TI->getMetadata(LLVMContext::MD_prof));
}
+TEST_F(IRBuilderTest, LandingPadName) {
+ IRBuilder<> Builder(BB);
+ LandingPadInst *LP = Builder.CreateLandingPad(Builder.getInt32Ty(),
+ Builder.getInt32(0), 0, "LP");
+ EXPECT_EQ(LP->getName(), "LP");
+}
+
TEST_F(IRBuilderTest, GetIntTy) {
IRBuilder<> Builder(BB);
IntegerType *Ty1 = Builder.getInt1Ty();