Simplify directory name handling in DILexicalBlockFile.
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 13 Mar 2013 22:23:51 +0000 (22:23 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 13 Mar 2013 22:23:51 +0000 (22:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo.h

index e91df10e01e4da1b4f0f560419270f239a034f08..c1b5813ff9466b99a6b5609ae279e152a7de5e52 100644 (file)
@@ -640,13 +640,10 @@ namespace llvm {
     unsigned getLineNumber() const { return getScope().getLineNumber(); }
     unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
     StringRef getDirectory() const {
-      StringRef dir = getFieldAs<DIFile>(2).getDirectory();
-      return !dir.empty() ? dir : getContext().getDirectory();
+      return getFieldAs<DIFile>(2).getDirectory();
     }
     StringRef getFilename() const {
-      StringRef filename = getFieldAs<DIFile>(2).getFilename();
-      assert(!filename.empty() && "Why'd you create this then?");
-      return filename;
+      return getFieldAs<DIFile>(2).getFilename();
     }
     DILexicalBlock getScope() const { return getFieldAs<DILexicalBlock>(1); }
     bool Verify() const;