diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp b/contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp index 8139c2cbb6cd..47c19c3d8ec4 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/LexicalScopes.cpp @@ -75,6 +75,11 @@ void LexicalScopes::extractLexicalScopes( const MachineInstr *PrevMI = nullptr; const DILocation *PrevDL = nullptr; for (const auto &MInsn : MBB) { + // Ignore DBG_VALUE and similar instruction that do not contribute to any + // instruction in the output. + if (MInsn.isMetaInstruction()) + continue; + // Check if instruction has valid location information. const DILocation *MIDL = MInsn.getDebugLoc(); if (!MIDL) { @@ -88,11 +93,6 @@ void LexicalScopes::extractLexicalScopes( continue; } - // Ignore DBG_VALUE and similar instruction that do not contribute to any - // instruction in the output. - if (MInsn.isMetaInstruction()) - continue; - if (RangeBeginMI) { // If we have already seen a beginning of an instruction range and // current instruction scope does not match scope of first instruction |