mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Handle versioning of compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
58421d7d08
commit
ca0dc56742
@ -614,6 +614,12 @@ bool CompileUnitDesc::classof(const DebugInfoDesc *D) {
|
||||
///
|
||||
void CompileUnitDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
AnchoredDesc::ApplyToFields(Visitor);
|
||||
|
||||
// Handle cases out of sync with compiler.
|
||||
if (getVersion() == 0) {
|
||||
unsigned DebugVersion;
|
||||
Visitor->Apply(DebugVersion);
|
||||
}
|
||||
|
||||
Visitor->Apply(Language);
|
||||
Visitor->Apply(FileName);
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/GlobalVariable.h"
|
||||
#include "llvm/CodeGen/MachineDebugInfo.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -59,12 +60,16 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) {
|
||||
///
|
||||
|
||||
std::string DbgStopPointInst::getFileName() const {
|
||||
// Once the operand indices are verified, update this assert
|
||||
assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices");
|
||||
GlobalVariable *GV = cast<GlobalVariable>(getContext());
|
||||
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
|
||||
return CS->getOperand(3)->getStringValue();
|
||||
}
|
||||
|
||||
std::string DbgStopPointInst::getDirectory() const {
|
||||
// Once the operand indices are verified, update this assert
|
||||
assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices");
|
||||
GlobalVariable *GV = cast<GlobalVariable>(getContext());
|
||||
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
|
||||
return CS->getOperand(4)->getStringValue();
|
||||
|
Loading…
Reference in New Issue
Block a user