diff options
author | Devang Patel <dpatel@apple.com> | 2009-12-03 19:11:07 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-12-03 19:11:07 +0000 |
commit | eb57c59b66436dac0b0b5dc1fa696c86b5622588 (patch) | |
tree | b8cda11dd930031652dcc79fc7dae74ea0eb4c0f /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 083f229ba211d5b2ddb4a446634302d7850f2d61 (diff) | |
download | bcm5719-llvm-eb57c59b66436dac0b0b5dc1fa696c86b5622588.tar.gz bcm5719-llvm-eb57c59b66436dac0b0b5dc1fa696c86b5622588.zip |
Add support to emit debug info for virtual functions and virtual base classes.
llvm-svn: 90474
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index b1eff9efe16..4a012ce484f 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -866,7 +866,9 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context, DICompileUnit CompileUnit, unsigned LineNo, DIType Type, bool isLocalToUnit, - bool isDefinition) { + bool isDefinition, + unsigned VK, unsigned VIndex, + DIType ContainingType) { Value *Elts[] = { GetTagConstant(dwarf::DW_TAG_subprogram), @@ -879,9 +881,12 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), Type.getNode(), ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit), - ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition) + ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition), + ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK), + ConstantInt::get(Type::getInt32Ty(VMContext), VIndex), + ContainingType.getNode() }; - return DISubprogram(MDNode::get(VMContext, &Elts[0], 11)); + return DISubprogram(MDNode::get(VMContext, &Elts[0], 14)); } /// CreateSubprogramDefinition - Create new subprogram descriptor for the @@ -902,9 +907,12 @@ DISubprogram DIFactory::CreateSubprogramDefinition(DISubprogram &SPDeclaration) DeclNode->getElement(7), // LineNo DeclNode->getElement(8), // Type DeclNode->getElement(9), // isLocalToUnit - ConstantInt::get(Type::getInt1Ty(VMContext), true) + ConstantInt::get(Type::getInt1Ty(VMContext), true), + DeclNode->getElement(11), // Virtuality + DeclNode->getElement(12), // VIndex + DeclNode->getElement(13) // Containting Type }; - return DISubprogram(MDNode::get(VMContext, &Elts[0], 11)); + return DISubprogram(MDNode::get(VMContext, &Elts[0], 14)); } /// CreateGlobalVariable - Create a new descriptor for the specified global. |