///
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);
#include "llvm/Constants.h"
#include "llvm/GlobalVariable.h"
+#include "llvm/CodeGen/MachineDebugInfo.h"
using namespace llvm;
///
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();