Debug Info: move DIScope::getContext back from DwarfDebug.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 79bb8849e23724f09013bd71466e0e736d1fa249..7db6df0e19a68680e8b35af7dc50ab3657d18236 100644 (file)
@@ -2649,26 +2649,3 @@ void DwarfDebug::emitDebugStrDWO() {
 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();
-}