diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-03-13 22:52:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-03-13 22:52:59 +0000 |
commit | 22063d60ab2e3d4fa9528cffb14e8284c7058a30 (patch) | |
tree | 6eddadb778e27df518213ea5ace3ab5b1e4892b1 /include | |
parent | 036af1486677b7255acbafca7c404dd01bbfce7f (diff) | |
download | llvm-22063d60ab2e3d4fa9528cffb14e8284c7058a30.tar.gz llvm-22063d60ab2e3d4fa9528cffb14e8284c7058a30.tar.bz2 llvm-22063d60ab2e3d4fa9528cffb14e8284c7058a30.tar.xz |
Simplify file/directory name handling in DILexicalBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DebugInfo.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index c1b5813ff9..47ac050c9f 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -621,12 +621,10 @@ namespace llvm { unsigned getLineNumber() const { return getUnsignedField(2); } unsigned getColumnNumber() const { return getUnsignedField(3); } StringRef getDirectory() const { - StringRef dir = getFieldAs<DIFile>(4).getDirectory(); - return !dir.empty() ? dir : getContext().getDirectory(); + return getFieldAs<DIFile>(4).getDirectory(); } StringRef getFilename() const { - StringRef filename = getFieldAs<DIFile>(4).getFilename(); - return !filename.empty() ? filename : getContext().getFilename(); + return getFieldAs<DIFile>(4).getFilename(); } bool Verify() const; }; |