From 3386e0ea7b6cdf3efd835d65da486c2e9f408b9e Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 30 Mar 2015 23:58:59 +0000 Subject: LexicalScopes: Cleanup remaining uses of DebugLoc llvm-svn: 233644 --- llvm/lib/CodeGen/LexicalScopes.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp') 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; } -- cgit v1.2.3