[llvm] r176984 - Simplify directory name handling in DILexicalBlockFile.
David Blaikie
dblaikie at gmail.com
Wed Mar 13 15:23:51 PDT 2013
Author: dblaikie
Date: Wed Mar 13 17:23:51 2013
New Revision: 176984
URL: http://llvm.org/viewvc/llvm-project?rev=176984&view=rev
Log:
Simplify directory name handling in DILexicalBlockFile.
Modified:
llvm/trunk/include/llvm/DebugInfo.h
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=176984&r1=176983&r2=176984&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Wed Mar 13 17:23:51 2013
@@ -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;
More information about the llvm-commits
mailing list