From: David Blaikie Date: Wed, 13 Mar 2013 22:23:51 +0000 (+0000) Subject: Simplify directory name handling in DILexicalBlockFile. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=33905b2a34da69bc05d67567fe1c1b6e74d32fa0;p=oota-llvm.git Simplify directory name handling in DILexicalBlockFile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index e91df10e01e..c1b5813ff94 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(2).getDirectory(); - return !dir.empty() ? dir : getContext().getDirectory(); + return getFieldAs(2).getDirectory(); } StringRef getFilename() const { - StringRef filename = getFieldAs(2).getFilename(); - assert(!filename.empty() && "Why'd you create this then?"); - return filename; + return getFieldAs(2).getFilename(); } DILexicalBlock getScope() const { return getFieldAs(1); } bool Verify() const;