summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LexicalScopes.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 23:58:59 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 23:58:59 +0000
commit3386e0ea7b6cdf3efd835d65da486c2e9f408b9e (patch)
treebffe9b598eb910514159ef746676f5bc5a8dad44 /llvm/lib/CodeGen/LexicalScopes.cpp
parent82eba746df36e6bc95b0c0667697cdeb3dc4fbef (diff)
downloadbcm5719-llvm-3386e0ea7b6cdf3efd835d65da486c2e9f408b9e.tar.gz
bcm5719-llvm-3386e0ea7b6cdf3efd835d65da486c2e9f408b9e.zip
LexicalScopes: Cleanup remaining uses of DebugLoc
llvm-svn: 233644
Diffstat (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r--llvm/lib/CodeGen/LexicalScopes.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp
index 45f312bb7b1..fc12b8ff3ff 100644
--- a/llvm/lib/CodeGen/LexicalScopes.cpp
+++ b/llvm/lib/CodeGen/LexicalScopes.cpp
@@ -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;
}
OpenPOWER on IntegriCloud