From 33905b2a34da69bc05d67567fe1c1b6e74d32fa0 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 13 Mar 2013 22:23:51 +0000 Subject: [PATCH] Simplify directory name handling in DILexicalBlockFile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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;