mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 08:37:45 +00:00
Simplify directory name handling in DILexicalBlockFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e0805a992d
commit
33905b2a34
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user