mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-02 08:26:39 +00:00
Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -579,6 +579,17 @@ namespace llvm {
|
||||
DIFile F = getFieldAs<DIFile>(6);
|
||||
return F.getCompileUnit();
|
||||
}
|
||||
StringRef getFilename() const {
|
||||
if (getVersion() <= llvm::LLVMDebugVersion10)
|
||||
return getContext().getFilename();
|
||||
return getFieldAs<DIFile>(6).getFilename();
|
||||
}
|
||||
StringRef getDirectory() const {
|
||||
if (getVersion() <= llvm::LLVMDebugVersion10)
|
||||
return getContext().getDirectory();
|
||||
return getFieldAs<DIFile>(6).getDirectory();
|
||||
|
||||
}
|
||||
|
||||
unsigned getLineNumber() const { return getUnsignedField(7); }
|
||||
DIType getType() const { return getFieldAs<DIType>(8); }
|
||||
|
Reference in New Issue
Block a user