Refactor the filename/directory information in DISubprogram to refer directly to...
[oota-llvm.git] / lib / IR / DebugInfo.cpp
index bc5e415eea6ca1cc6a4753f6cf220fa425adae58..91968d8fbf079e3b86855c4b04c045b5276a5bbc 100644 (file)
@@ -668,8 +668,6 @@ StringRef DIScope::getFilename() const {
     return DILexicalBlockFile(DbgNode).getFilename();
   if (isLexicalBlock())
     return DILexicalBlock(DbgNode).getFilename();
-  if (isSubprogram())
-    return DISubprogram(DbgNode).getFilename();
   return ::getStringField(getNodeField(DbgNode, 1), 0);
 }
 
@@ -680,8 +678,6 @@ StringRef DIScope::getDirectory() const {
     return DILexicalBlockFile(DbgNode).getDirectory();
   if (isLexicalBlock())
     return DILexicalBlock(DbgNode).getDirectory();
-  if (isSubprogram())
-    return DISubprogram(DbgNode).getDirectory();
   return ::getStringField(getNodeField(DbgNode, 1), 1);
 }