[llvm-commits] [llvm] r94586 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp
Devang Patel
dpatel at apple.com
Tue Jan 26 13:15:00 PST 2010
Author: dpatel
Date: Tue Jan 26 15:14:59 2010
New Revision: 94586
URL: http://llvm.org/viewvc/llvm-project?rev=94586&view=rev
Log:
Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable.
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=94586&r1=94585&r2=94586&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Tue Jan 26 15:14:59 2010
@@ -298,6 +298,9 @@
DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
unsigned getRunTimeLang() const { return getUnsignedField(11); }
+ DICompositeType getContainingType() const {
+ return getFieldAs<DICompositeType>(12);
+ }
/// Verify - Verify that a composite type descriptor is well formed.
bool Verify() const;
@@ -567,7 +570,8 @@
uint64_t OffsetInBits, unsigned Flags,
DIType DerivedFrom,
DIArray Elements,
- unsigned RunTimeLang = 0);
+ unsigned RunTimeLang = 0,
+ MDNode *ContainingType = 0);
/// CreateCompositeType - Create a composite type like array, struct, etc.
DICompositeType CreateCompositeTypeEx(unsigned Tag, DIDescriptor Context,
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=94586&r1=94585&r2=94586&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Tue Jan 26 15:14:59 2010
@@ -794,7 +794,8 @@
unsigned Flags,
DIType DerivedFrom,
DIArray Elements,
- unsigned RuntimeLang) {
+ unsigned RuntimeLang,
+ MDNode *ContainingType) {
Value *Elts[] = {
GetTagConstant(Tag),
@@ -808,9 +809,10 @@
ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
DerivedFrom.getNode(),
Elements.getNode(),
- ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang)
+ ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang),
+ ContainingType
};
- return DICompositeType(MDNode::get(VMContext, &Elts[0], 12));
+ return DICompositeType(MDNode::get(VMContext, &Elts[0], 13));
}
More information about the llvm-commits
mailing list