Simplify file/directory name handling in DILexicalBlock
[oota-llvm.git] / include / llvm / DebugInfo.h
index c1b5813ff9466b99a6b5609ae279e152a7de5e52..47ac050c9f58c5bf98d4b05456a09f0a7142a82b 100644 (file)
@@ -621,12 +621,10 @@ namespace llvm {
     unsigned getLineNumber() const   { return getUnsignedField(2);         }
     unsigned getColumnNumber() const { return getUnsignedField(3);         }
     StringRef getDirectory() const {
-      StringRef dir = getFieldAs<DIFile>(4).getDirectory();
-      return !dir.empty() ? dir : getContext().getDirectory();
+      return getFieldAs<DIFile>(4).getDirectory();
     }
     StringRef getFilename() const {
-      StringRef filename = getFieldAs<DIFile>(4).getFilename();
-      return !filename.empty() ? filename : getContext().getFilename();
+      return getFieldAs<DIFile>(4).getFilename();
     }
     bool Verify() const;
   };