mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Do not rely on context to find file info. It is already provided as a separate field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117577 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -582,8 +582,14 @@ namespace llvm {
|
|||||||
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
|
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
|
||||||
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
||||||
StringRef getName() const { return getStringField(2); }
|
StringRef getName() const { return getStringField(2); }
|
||||||
StringRef getDirectory() const { return getContext().getDirectory(); }
|
StringRef getDirectory() const {
|
||||||
StringRef getFilename() const { return getContext().getFilename(); }
|
DIFile F = getFieldAs<DIFile>(3);
|
||||||
|
return F.getDirectory();
|
||||||
|
}
|
||||||
|
StringRef getFilename() const {
|
||||||
|
DIFile F = getFieldAs<DIFile>(3);
|
||||||
|
return F.getFilename();
|
||||||
|
}
|
||||||
DICompileUnit getCompileUnit() const{
|
DICompileUnit getCompileUnit() const{
|
||||||
if (getVersion() == llvm::LLVMDebugVersion7)
|
if (getVersion() == llvm::LLVMDebugVersion7)
|
||||||
return getFieldAs<DICompileUnit>(3);
|
return getFieldAs<DICompileUnit>(3);
|
||||||
|
Reference in New Issue
Block a user