summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/unittests/IR/IRBuilderTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
committerpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
commitbd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch)
tree309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/unittests/IR/IRBuilderTest.cpp
parentkillp -a should not kill the window if only one pane. (diff)
downloadwireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz
wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r--gnu/llvm/unittests/IR/IRBuilderTest.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/llvm/unittests/IR/IRBuilderTest.cpp b/gnu/llvm/unittests/IR/IRBuilderTest.cpp
index bd0eae0399a..58fd71b8a35 100644
--- a/gnu/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/gnu/llvm/unittests/IR/IRBuilderTest.cpp
@@ -252,7 +252,7 @@ TEST_F(IRBuilderTest, FastMathFlags) {
}
TEST_F(IRBuilderTest, WrapFlags) {
- IRBuilder<true, NoFolder> Builder(BB);
+ IRBuilder<NoFolder> Builder(BB);
// Test instructions.
GlobalVariable *G = new GlobalVariable(*M, Builder.getInt32Ty(), true,
@@ -418,4 +418,18 @@ TEST_F(IRBuilderTest, DebugLoc) {
DIB.finalize();
}
+
+TEST_F(IRBuilderTest, DIImportedEntity) {
+ IRBuilder<> Builder(BB);
+ DIBuilder DIB(*M);
+ auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/",
+ "llvm-cobol74", true, "", 0);
+ DIB.createImportedDeclaration(CU, nullptr, 1);
+ DIB.createImportedDeclaration(CU, nullptr, 1);
+ DIB.createImportedModule(CU, (DIImportedEntity *)nullptr, 2);
+ DIB.createImportedModule(CU, (DIImportedEntity *)nullptr, 2);
+ DIB.finalize();
+ EXPECT_TRUE(verifyModule(*M));
+ EXPECT_TRUE(CU->getImportedEntities().size() == 2);
+}
}