summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/IRBuilderTest.cpp
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2016-12-14 20:24:54 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2016-12-14 20:24:54 +0000
commit43c8b6b7b2277e1ae07ca86ee58859a5aab6acc1 (patch)
tree423dfb9b91765b0ad1696cf04ba9fc3716e1e3f3 /llvm/unittests/IR/IRBuilderTest.cpp
parentfa9a17ee80eb7ca6f3b74411f5a4b7d4d578e300 (diff)
downloadbcm5719-llvm-43c8b6b7b2277e1ae07ca86ee58859a5aab6acc1.tar.gz
bcm5719-llvm-43c8b6b7b2277e1ae07ca86ee58859a5aab6acc1.zip
[DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory.
This way it will be easier to expand DIFile (e.g., to contain checksum) without the need to modify the createCompileUnit() API. Reviewers: llvm-commits, rnk Differential Revision: https://reviews.llvm.org/D27762 llvm-svn: 289702
Diffstat (limited to 'llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r--llvm/unittests/IR/IRBuilderTest.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index 01423a5b412..579384c5a5f 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -340,8 +340,9 @@ TEST_F(IRBuilderTest, DIBuilder) {
IRBuilder<> Builder(BB);
DIBuilder DIB(*M);
auto File = DIB.createFile("F.CBL", "/");
- auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/",
- "llvm-cobol74", true, "", 0);
+ auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74,
+ DIB.createFile("F.CBL", "/"), "llvm-cobol74",
+ true, "", 0);
auto Type = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
auto SP = DIB.createFunction(CU, "foo", "", File, 1, Type, false, true, 1,
DINode::FlagZero, true);
@@ -392,8 +393,9 @@ TEST_F(IRBuilderTest, DebugLoc) {
DIBuilder DIB(*M);
auto File = DIB.createFile("tmp.cpp", "/");
- auto CU = DIB.createCompileUnit(dwarf::DW_LANG_C_plus_plus_11, "tmp.cpp", "/",
- "", true, "", 0);
+ auto CU = DIB.createCompileUnit(dwarf::DW_LANG_C_plus_plus_11,
+ DIB.createFile("tmp.cpp", "/"), "", true, "",
+ 0);
auto SPType = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
auto SP =
DIB.createFunction(CU, "foo", "foo", File, 1, SPType, false, true, 1);
@@ -422,8 +424,9 @@ TEST_F(IRBuilderTest, DebugLoc) {
TEST_F(IRBuilderTest, DIImportedEntity) {
IRBuilder<> Builder(BB);
DIBuilder DIB(*M);
- auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/",
- "llvm-cobol74", true, "", 0);
+ auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74,
+ DIB.createFile("F.CBL", "/"), "llvm-cobol74",
+ true, "", 0);
DIB.createImportedDeclaration(CU, nullptr, 1);
DIB.createImportedDeclaration(CU, nullptr, 1);
DIB.createImportedModule(CU, (DIImportedEntity *)nullptr, 2);
OpenPOWER on IntegriCloud