DebugInfo: Delete subclasses of DIScope

Delete subclasses of (the already defunct) `DIScope`, updating users to
use the raw pointers from the `Metadata` hierarchy directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-20 22:10:08 +00:00
parent e0d6a5c90a
commit d3c29ac587
19 changed files with 92 additions and 180 deletions

View File

@@ -705,7 +705,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F,
// Patch the pointer to LLVM function in debug info descriptor.
auto DI = FunctionDIs.find(F);
if (DI != FunctionDIs.end()) {
DISubprogram SP = DI->second;
MDSubprogram *SP = DI->second;
SP->replaceFunction(NF);
// Ensure the map is updated so it can be reused on subsequent argument
// promotions of the same function.

View File

@@ -303,7 +303,7 @@ bool DAE::DeleteDeadVarargs(Function &Fn) {
// Patch the pointer to LLVM function in debug info descriptor.
auto DI = FunctionDIs.find(&Fn);
if (DI != FunctionDIs.end()) {
DISubprogram SP = DI->second;
MDSubprogram *SP = DI->second;
SP->replaceFunction(NF);
// Ensure the map is updated so it can be reused on non-varargs argument
// eliminations of the same function.

View File

@@ -307,11 +307,8 @@ bool StripDeadDebugInfo::runOnModule(Module &M) {
for (MDCompileUnit *DIC : F.compile_units()) {
// Create our live subprogram list.
MDSubprogramArray SPs = DIC->getSubprograms();
bool SubprogramChange = false;
for (unsigned i = 0, e = SPs.size(); i != e; ++i) {
DISubprogram DISP = SPs[i];
for (MDSubprogram *DISP : DIC->getSubprograms()) {
// Make sure we visit each subprogram only once.
if (!VisitedSet.insert(DISP).second)
continue;