mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Slightly simplify code in DwarfDebug::beginFunction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207710 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d51ae64368
commit
b861d48f79
@ -1440,9 +1440,8 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|||||||
Asm->OutStreamer.EmitLabel(FunctionBeginSym);
|
Asm->OutStreamer.EmitLabel(FunctionBeginSym);
|
||||||
|
|
||||||
// Collect user variables, find the end of the prologue.
|
// Collect user variables, find the end of the prologue.
|
||||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end(); I != E;
|
for (const auto &MBB : *MF) {
|
||||||
++I) {
|
for (MachineBasicBlock::const_iterator II = MBB.begin(), IE = MBB.end();
|
||||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
|
||||||
II != IE; ++II) {
|
II != IE; ++II) {
|
||||||
const MachineInstr *MI = II;
|
const MachineInstr *MI = II;
|
||||||
if (MI->isDebugValue()) {
|
if (MI->isDebugValue()) {
|
||||||
@ -1454,12 +1453,11 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|||||||
std::make_pair(Var, SmallVector<const MachineInstr *, 4>()));
|
std::make_pair(Var, SmallVector<const MachineInstr *, 4>()));
|
||||||
if (IterPair.second)
|
if (IterPair.second)
|
||||||
UserVariables.push_back(Var);
|
UserVariables.push_back(Var);
|
||||||
} else {
|
} else if (!MI->getFlag(MachineInstr::FrameSetup) &&
|
||||||
|
PrologEndLoc.isUnknown() && !MI->getDebugLoc().isUnknown()) {
|
||||||
// First known non-DBG_VALUE and non-frame setup location marks
|
// First known non-DBG_VALUE and non-frame setup location marks
|
||||||
// the beginning of the function body.
|
// the beginning of the function body.
|
||||||
if (!MI->getFlag(MachineInstr::FrameSetup) &&
|
PrologEndLoc = MI->getDebugLoc();
|
||||||
(PrologEndLoc.isUnknown() && !MI->getDebugLoc().isUnknown()))
|
|
||||||
PrologEndLoc = MI->getDebugLoc();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user