mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-15 17:07:52 +00:00
Backward compatibility. Gracefully handle older versions of debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117595 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
787c33718d
commit
8f6a281e97
@ -272,10 +272,16 @@ namespace llvm {
|
||||
return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
|
||||
}
|
||||
StringRef getDirectory() const {
|
||||
if (getVersion() == llvm::LLVMDebugVersion7)
|
||||
return getCompileUnit().getDirectory();
|
||||
|
||||
DIFile F = getFieldAs<DIFile>(3);
|
||||
return F.getDirectory();
|
||||
}
|
||||
StringRef getFilename() const {
|
||||
if (getVersion() == llvm::LLVMDebugVersion7)
|
||||
return getCompileUnit().getFilename();
|
||||
|
||||
DIFile F = getFieldAs<DIFile>(3);
|
||||
return F.getFilename();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user