X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfDebug.cpp;h=608ce6a5688e911e5c24f6cbd1e42e424a7c419b;hb=2c46deb1d07f4588ee70059cdd4c7145f81bc8e8;hp=547d25351806f660ab349b540261d2f6a1a64b7c;hpb=574793250890a55103c53f5ffaf6933db1e2e388;p=oota-llvm.git diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 547d2535180..608ce6a5688 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -769,9 +769,8 @@ void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, // Add to context owner. TheCU->addToContextOwner(SubprogramDie, SP.getContext()); - // Expose as global, if requested. - if (HasDwarfPubSections) - TheCU->addGlobalName(SP.getName(), SubprogramDie); + // Expose as a global name. + TheCU->addGlobalName(SP.getName(), SubprogramDie); } void DwarfDebug::constructImportedEntityDIE(CompileUnit *TheCU, @@ -2645,31 +2644,3 @@ void DwarfDebug::emitDebugStrDWO() { InfoHolder.emitStrings(Asm->getObjFileLowering().getDwarfStrDWOSection(), OffSec, StrSym); } - -/// Find the MDNode for the given scope reference. -DIScope DwarfDebug::resolve(DIScopeRef SRef) const { - return SRef.resolve(TypeIdentifierMap); -} - -// If the current node has a parent scope then return that, -// else return an empty scope. -DIScope DwarfDebug::getScopeContext(DIScope S) const { - - if (S.isType()) - return resolve(DIType(S).getContext()); - - if (S.isSubprogram()) - return DISubprogram(S).getContext(); - - if (S.isLexicalBlock()) - return DILexicalBlock(S).getContext(); - - if (S.isLexicalBlockFile()) - return DILexicalBlockFile(S).getContext(); - - if (S.isNameSpace()) - return DINameSpace(S).getContext(); - - assert((S.isFile() || S.isCompileUnit()) && "Unhandled type of scope."); - return DIScope(); -}