mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Distinguish between two copies of one inlined variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -776,6 +776,17 @@ DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
|
||||
return DIVariable(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
/// cleanseInlinedVariable - Remove inlined scope from the variable.
|
||||
DIVariable llvm::cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext) {
|
||||
SmallVector<Value *, 16> Elts;
|
||||
// Insert inlined scope as 7th element.
|
||||
for (unsigned i = 0, e = DV->getNumOperands(); i != e; ++i)
|
||||
i == 7 ?
|
||||
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext))):
|
||||
Elts.push_back(DV->getOperand(i));
|
||||
return DIVariable(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DebugInfoFinder implementations.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user