diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-20 22:10:08 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-20 22:10:08 +0000 |
| commit | 2fbe13540a906cdb10a26889ab5c181ce242f563 (patch) | |
| tree | 71ee935b52af16fc0b4b6e2cf4efd8c4985498bf /llvm/unittests/Transforms | |
| parent | a7fbcbfe008e5796a0e51b830dd3034478bc47c4 (diff) | |
| download | bcm5719-llvm-2fbe13540a906cdb10a26889ab5c181ce242f563.tar.gz bcm5719-llvm-2fbe13540a906cdb10a26889ab5c181ce242f563.zip | |
DebugInfo: Delete subclasses of DIScope
Delete subclasses of (the already defunct) `DIScope`, updating users to
use the raw pointers from the `Metadata` hierarchy directly.
llvm-svn: 235356
Diffstat (limited to 'llvm/unittests/Transforms')
| -rw-r--r-- | llvm/unittests/Transforms/Utils/Cloning.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/llvm/unittests/Transforms/Utils/Cloning.cpp b/llvm/unittests/Transforms/Utils/Cloning.cpp index c0f25ab3b6f..d778903cbae 100644 --- a/llvm/unittests/Transforms/Utils/Cloning.cpp +++ b/llvm/unittests/Transforms/Utils/Cloning.cpp @@ -228,15 +228,16 @@ protected: IRBuilder<> IBuilder(C); // Function DI - DIFile File = DBuilder.createFile("filename.c", "/file/dir/"); + auto *File = DBuilder.createFile("filename.c", "/file/dir/"); DITypeArray ParamTypes = DBuilder.getOrCreateTypeArray(None); MDSubroutineType *FuncType = DBuilder.createSubroutineType(File, ParamTypes); - DICompileUnit CU = DBuilder.createCompileUnit(dwarf::DW_LANG_C99, - "filename.c", "/file/dir", "CloneFunc", false, "", 0); + auto *CU = + DBuilder.createCompileUnit(dwarf::DW_LANG_C99, "filename.c", + "/file/dir", "CloneFunc", false, "", 0); - DISubprogram Subprogram = DBuilder.createFunction(CU, "f", "f", File, 4, - FuncType, true, true, 3, 0, false, OldFunc); + auto *Subprogram = DBuilder.createFunction( + CU, "f", "f", File, 4, FuncType, true, true, 3, 0, false, OldFunc); // Function body BasicBlock* Entry = BasicBlock::Create(C, "", OldFunc); @@ -303,9 +304,9 @@ TEST_F(CloneFunc, Subprogram) { EXPECT_EQ(2U, SubprogramCount); auto Iter = Finder->subprograms().begin(); - DISubprogram Sub1 = cast<MDSubprogram>(*Iter); + auto *Sub1 = cast<MDSubprogram>(*Iter); Iter++; - DISubprogram Sub2 = cast<MDSubprogram>(*Iter); + auto *Sub2 = cast<MDSubprogram>(*Iter); EXPECT_TRUE( (Sub1->getFunction() == OldFunc && Sub2->getFunction() == NewFunc) || @@ -320,9 +321,9 @@ TEST_F(CloneFunc, SubprogramInRightCU) { EXPECT_EQ(2U, Finder->compile_unit_count()); auto Iter = Finder->compile_units().begin(); - DICompileUnit CU1 = cast<MDCompileUnit>(*Iter); + auto *CU1 = cast<MDCompileUnit>(*Iter); Iter++; - DICompileUnit CU2 = cast<MDCompileUnit>(*Iter); + auto *CU2 = cast<MDCompileUnit>(*Iter); EXPECT_TRUE(CU1->getSubprograms().size() == 0 || CU2->getSubprograms().size() == 0); } |

