mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
LexicalScopes: Cleanup remaining uses of DebugLoc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
497110d1b0
commit
1aa1d1a46c
@ -59,10 +59,10 @@ void LexicalScopes::extractLexicalScopes(
|
||||
for (const auto &MBB : *MF) {
|
||||
const MachineInstr *RangeBeginMI = nullptr;
|
||||
const MachineInstr *PrevMI = nullptr;
|
||||
DebugLoc PrevDL;
|
||||
const MDLocation *PrevDL = nullptr;
|
||||
for (const auto &MInsn : MBB) {
|
||||
// Check if instruction has valid location information.
|
||||
const DebugLoc &MIDL = MInsn.getDebugLoc();
|
||||
const MDLocation *MIDL = MInsn.getDebugLoc();
|
||||
if (!MIDL) {
|
||||
PrevMI = &MInsn;
|
||||
continue;
|
||||
@ -314,12 +314,10 @@ bool LexicalScopes::dominates(const MDLocation *DL, MachineBasicBlock *MBB) {
|
||||
bool Result = false;
|
||||
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E;
|
||||
++I) {
|
||||
DebugLoc IDL = I->getDebugLoc();
|
||||
if (!IDL)
|
||||
continue;
|
||||
if (LexicalScope *IScope = getOrCreateLexicalScope(IDL))
|
||||
if (Scope->dominates(IScope))
|
||||
return true;
|
||||
if (const MDLocation *IDL = I->getDebugLoc())
|
||||
if (LexicalScope *IScope = getOrCreateLexicalScope(IDL))
|
||||
if (Scope->dominates(IScope))
|
||||
return true;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user