mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -98,6 +98,10 @@ namespace llvm {
|
||||
bool isScope() const;
|
||||
bool isCompileUnit() const;
|
||||
bool isLexicalBlock() const;
|
||||
bool isSubrange() const;
|
||||
bool isEnumerator() const;
|
||||
bool isType() const;
|
||||
bool isGlobal() const;
|
||||
};
|
||||
|
||||
/// DISubrange - This is used to represent ranges, for array bounds.
|
||||
@@ -131,8 +135,8 @@ namespace llvm {
|
||||
}
|
||||
virtual ~DIScope() {}
|
||||
|
||||
virtual const char *getFilename() const { return NULL; }
|
||||
virtual const char *getDirectory() const { return NULL; }
|
||||
const char *getFilename() const;
|
||||
const char *getDirectory() const;
|
||||
};
|
||||
|
||||
/// DICompileUnit - A wrapper for a compile unit.
|
||||
@@ -438,6 +442,7 @@ namespace llvm {
|
||||
DbgNode = 0;
|
||||
}
|
||||
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
||||
const char *getDirectory() const { return getContext().getDirectory(); }
|
||||
const char *getFilename() const { return getContext().getFilename(); }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user