aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-13 22:23:51 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-13 22:23:51 +0000
commit33905b2a34da69bc05d67567fe1c1b6e74d32fa0 (patch)
treef0865d840cd8e9633df9e3848f2903951ead8cbf /include/llvm/DebugInfo.h
parente0805a992ddd2823604969c8aac61a2f339f3c01 (diff)
Simplify directory name handling in DILexicalBlockFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DebugInfo.h')
-rw-r--r--include/llvm/DebugInfo.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index e91df10e01..c1b5813ff9 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -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;