mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-29 08:02:51 +00:00
Do not construct location list backword!
llvm-svn: 104705
This commit is contained in:
parent
83d2cfd6cd
commit
691615151f
@ -2215,22 +2215,26 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) {
|
|||||||
RegVar->setDotDebugLocOffset(DotDebugLocEntries.size());
|
RegVar->setDotDebugLocOffset(DotDebugLocEntries.size());
|
||||||
if (DotDebugLocEntries.empty())
|
if (DotDebugLocEntries.empty())
|
||||||
DotDebugLocEntries.push_back(DotDebugLocEntry());
|
DotDebugLocEntries.push_back(DotDebugLocEntry());
|
||||||
const MachineInstr *Current = MultipleValues.back();
|
const MachineInstr *Begin = NULL;
|
||||||
MultipleValues.pop_back();
|
const MachineInstr *End = NULL;
|
||||||
while (!MultipleValues.empty()) {
|
for (SmallVector<const MachineInstr *, 4>::iterator
|
||||||
const MachineInstr *Next = MultipleValues.back();
|
MVI = MultipleValues.begin(), MVE = MultipleValues.end(); MVI != MVE; ++MVI) {
|
||||||
MultipleValues.pop_back();
|
if (!Begin) {
|
||||||
DbgValueStartMap[Next] = RegVar;
|
Begin = *MVI;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
End = *MVI;
|
||||||
|
DbgValueStartMap[End] = RegVar;
|
||||||
MachineLocation MLoc;
|
MachineLocation MLoc;
|
||||||
MLoc.set(Current->getOperand(0).getReg(), 0);
|
MLoc.set(Begin->getOperand(0).getReg(), 0);
|
||||||
const MCSymbol *FLabel = getLabelBeforeInsn(Next);
|
const MCSymbol *FLabel = getLabelBeforeInsn(Begin);
|
||||||
const MCSymbol *SLabel = getLabelBeforeInsn(Current);
|
const MCSymbol *SLabel = getLabelBeforeInsn(End);
|
||||||
DotDebugLocEntries.push_back(DotDebugLocEntry(FLabel, SLabel, MLoc));
|
DotDebugLocEntries.push_back(DotDebugLocEntry(FLabel, SLabel, MLoc));
|
||||||
Current = Next;
|
Begin = End;
|
||||||
if (MultipleValues.empty()) {
|
if (MVI + 1 == MVE) {
|
||||||
// If Next is the last instruction then its value is valid
|
// If End is the last instruction then its value is valid
|
||||||
// until the end of the funtion.
|
// until the end of the funtion.
|
||||||
MLoc.set(Next->getOperand(0).getReg(), 0);
|
MLoc.set(End->getOperand(0).getReg(), 0);
|
||||||
DotDebugLocEntries.
|
DotDebugLocEntries.
|
||||||
push_back(DotDebugLocEntry(SLabel, FunctionEndSym, MLoc));
|
push_back(DotDebugLocEntry(SLabel, FunctionEndSym, MLoc));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user