mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Debug info: split out complex DIVariable address expressions into a
separate MDNode so they can be uniqued via folding set magic. To conserve space, DIVariable nodes are still variable-length, with the last two fields being optional. No functional change. http://reviews.llvm.org/D3526 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+13
-12
@@ -1075,18 +1075,19 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope,
|
||||
DITypeRef Ty,
|
||||
ArrayRef<Value *> Addr,
|
||||
unsigned ArgNo) {
|
||||
SmallVector<Value *, 15> Elts;
|
||||
Elts.push_back(GetTagConstant(VMContext, Tag));
|
||||
Elts.push_back(getNonCompileUnitScope(Scope)),
|
||||
Elts.push_back(MDString::get(VMContext, Name));
|
||||
Elts.push_back(F);
|
||||
Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext),
|
||||
(LineNo | (ArgNo << 24))));
|
||||
Elts.push_back(Ty);
|
||||
Elts.push_back(Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
||||
Elts.push_back(Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
||||
Elts.append(Addr.begin(), Addr.end());
|
||||
|
||||
assert(Addr.size() > 0 && "complex address is empty");
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, Tag),
|
||||
getNonCompileUnitScope(Scope),
|
||||
MDString::get(VMContext, Name),
|
||||
F,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext),
|
||||
(LineNo | (ArgNo << 24))),
|
||||
Ty,
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
||||
MDNode::get(VMContext, Addr)
|
||||
};
|
||||
return DIVariable(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user