mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
This reverts commit 9fec5e346e
.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -628,9 +628,7 @@ namespace llvm {
|
|||||||
uint64_t getAddrElement(unsigned Idx) const {
|
uint64_t getAddrElement(unsigned Idx) const {
|
||||||
if (getVersion() <= llvm::LLVMDebugVersion8)
|
if (getVersion() <= llvm::LLVMDebugVersion8)
|
||||||
return getUInt64Field(Idx+6);
|
return getUInt64Field(Idx+6);
|
||||||
if (getVersion() == llvm::LLVMDebugVersion9)
|
return getUInt64Field(Idx+7);
|
||||||
return getUInt64Field(Idx+7);
|
|
||||||
return getUInt64Field(Idx+8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isBlockByrefVariable - Return true if the variable was declared as
|
/// isBlockByrefVariable - Return true if the variable was declared as
|
||||||
@ -718,13 +716,6 @@ namespace llvm {
|
|||||||
/// suitable to hold function specific information.
|
/// suitable to hold function specific information.
|
||||||
NamedMDNode *getFnSpecificMDNode(const Module &M, StringRef Name);
|
NamedMDNode *getFnSpecificMDNode(const Module &M, StringRef Name);
|
||||||
|
|
||||||
/// createInlinedVariable - Create a new inlined variable based on current
|
|
||||||
/// variable.
|
|
||||||
/// @param DV Current Variable.
|
|
||||||
/// @param InlinedScope Location at current variable is inlined.
|
|
||||||
DIVariable createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
|
|
||||||
LLVMContext &VMContext);
|
|
||||||
|
|
||||||
class DebugInfoFinder {
|
class DebugInfoFinder {
|
||||||
public:
|
public:
|
||||||
/// processModule - Process entire module and collect debug info
|
/// processModule - Process entire module and collect debug info
|
||||||
|
@ -22,9 +22,8 @@ namespace llvm {
|
|||||||
// Debug info constants.
|
// Debug info constants.
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
LLVMDebugVersion = (10 << 16), // Current version of debug information.
|
LLVMDebugVersion = (9 << 16), // Current version of debug information.
|
||||||
LLVMDebugVersion9 = (9 << 16), // Constant for version 9.
|
LLVMDebugVersion8 = (8 << 16), // Cconstant for version 8.
|
||||||
LLVMDebugVersion8 = (8 << 16), // Constant for version 8.
|
|
||||||
LLVMDebugVersion7 = (7 << 16), // Constant for version 7.
|
LLVMDebugVersion7 = (7 << 16), // Constant for version 7.
|
||||||
LLVMDebugVersion6 = (6 << 16), // Constant for version 6.
|
LLVMDebugVersion6 = (6 << 16), // Constant for version 6.
|
||||||
LLVMDebugVersion5 = (5 << 16), // Constant for version 5.
|
LLVMDebugVersion5 = (5 << 16), // Constant for version 5.
|
||||||
|
@ -626,8 +626,7 @@ DIVariable DIBuilder::createLocalVariable(unsigned Tag, DIDescriptor Scope,
|
|||||||
File,
|
File,
|
||||||
ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))),
|
ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))),
|
||||||
Ty,
|
Ty,
|
||||||
ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
|
ConstantInt::get(Type::getInt32Ty(VMContext), Flags)
|
||||||
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
|
||||||
};
|
};
|
||||||
MDNode *Node = MDNode::get(VMContext, Elts);
|
MDNode *Node = MDNode::get(VMContext, Elts);
|
||||||
if (AlwaysPreserve) {
|
if (AlwaysPreserve) {
|
||||||
@ -662,7 +661,6 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope,
|
|||||||
Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))));
|
Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))));
|
||||||
Elts.push_back(Ty);
|
Elts.push_back(Ty);
|
||||||
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
||||||
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
|
|
||||||
Elts.append(Addr.begin(), Addr.end());
|
Elts.append(Addr.begin(), Addr.end());
|
||||||
|
|
||||||
return DIVariable(MDNode::get(VMContext, Elts));
|
return DIVariable(MDNode::get(VMContext, Elts));
|
||||||
|
@ -111,9 +111,7 @@ Function *DIDescriptor::getFunctionField(unsigned Elt) const {
|
|||||||
unsigned DIVariable::getNumAddrElements() const {
|
unsigned DIVariable::getNumAddrElements() const {
|
||||||
if (getVersion() <= llvm::LLVMDebugVersion8)
|
if (getVersion() <= llvm::LLVMDebugVersion8)
|
||||||
return DbgNode->getNumOperands()-6;
|
return DbgNode->getNumOperands()-6;
|
||||||
if (getVersion() == llvm::LLVMDebugVersion9)
|
return DbgNode->getNumOperands()-7;
|
||||||
return DbgNode->getNumOperands()-7;
|
|
||||||
return DbgNode->getNumOperands()-8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -762,19 +760,6 @@ NamedMDNode *llvm::getOrInsertFnSpecificMDNode(Module &M, StringRef FuncName) {
|
|||||||
return M.getOrInsertNamedMetadata(Name.str());
|
return M.getOrInsertNamedMetadata(Name.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// createInlinedVariable - Create a new inlined variable based on current
|
|
||||||
/// variable.
|
|
||||||
/// @param DV Current Variable.
|
|
||||||
/// @param InlinedScope Location at current variable is inlined.
|
|
||||||
DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
|
|
||||||
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(InlinedScope) :
|
|
||||||
Elts.push_back(DV->getOperand(i));
|
|
||||||
return DIVariable(MDNode::get(VMContext, Elts));
|
|
||||||
}
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// DebugInfoFinder implementations.
|
// DebugInfoFinder implementations.
|
||||||
|
Reference in New Issue
Block a user