mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
r80406, and readd a -print-dbginfo test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,17 +61,11 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) {
|
||||
Value *DbgStopPointInst::getFileName() const {
|
||||
// Once the operand indices are verified, update this assert
|
||||
assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices");
|
||||
GlobalVariable *GV = cast<GlobalVariable>(getContext());
|
||||
if (!GV->hasInitializer()) return NULL;
|
||||
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
|
||||
return CS->getOperand(3);
|
||||
return getContext()->getElement(3);
|
||||
}
|
||||
|
||||
Value *DbgStopPointInst::getDirectory() const {
|
||||
// Once the operand indices are verified, update this assert
|
||||
assert(LLVMDebugVersion == (7 << 16) && "Verify operand indices");
|
||||
GlobalVariable *GV = cast<GlobalVariable>(getContext());
|
||||
if (!GV->hasInitializer()) return NULL;
|
||||
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
|
||||
return CS->getOperand(4);
|
||||
return getContext()->getElement(4);
|
||||
}
|
||||
|
Reference in New Issue
Block a user