aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/DebugInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/DebugInfo.h')
-rw-r--r--include/llvm/Analysis/DebugInfo.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index b67468d..c560ec2 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -197,7 +197,8 @@ namespace llvm {
FlagProtected = 1 << 1,
FlagFwdDecl = 1 << 2,
FlagAppleBlock = 1 << 3,
- FlagBlockByrefStruct = 1 << 4
+ FlagBlockByrefStruct = 1 << 4,
+ FlagVirtual = 1 << 5
};
protected:
@@ -242,6 +243,9 @@ namespace llvm {
bool isBlockByrefStruct() const {
return (getFlags() & FlagBlockByrefStruct) != 0;
}
+ bool isVirtual() const {
+ return (getFlags() & FlagVirtual) != 0;
+ }
/// dump - print type.
void dump() const;
@@ -366,6 +370,24 @@ namespace llvm {
/// compile unit, like 'static' in C.
unsigned isLocalToUnit() const { return getUnsignedField(9); }
unsigned isDefinition() const { return getUnsignedField(10); }
+
+ unsigned getVirtuality() const {
+ if (DbgNode->getNumElements() < 14)
+ return 0;
+ return getUnsignedField(11);
+ }
+
+ unsigned getVirtualIndex() const {
+ if (DbgNode->getNumElements() < 14)
+ return 0;
+ return getUnsignedField(12);
+ }
+
+ DICompositeType getContainingType() const {
+ assert (DbgNode->getNumElements() >= 14 && "Invalid type!");
+ return getFieldAs<DICompositeType>(13);
+ }
+
StringRef getFilename() const { return getCompileUnit().getFilename();}
StringRef getDirectory() const { return getCompileUnit().getDirectory();}
@@ -565,7 +587,10 @@ namespace llvm {
StringRef LinkageName,
DICompileUnit CompileUnit, unsigned LineNo,
DIType Type, bool isLocalToUnit,
- bool isDefinition);
+ bool isDefinition,
+ unsigned VK = 0,
+ unsigned VIndex = 0,
+ DIType = DIType());
/// CreateSubprogramDefinition - Create new subprogram descriptor for the
/// given declaration.