[PATCH] D149762: Change if() continue; to an assert if a DBG_VALUE or DBG_VALUE_LIST returns a null DILocalVariable
Shubham Sandeep Rastogi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 09:27:16 PDT 2023
rastogishubham updated this revision to Diff 519117.
rastogishubham added a comment.
clang-formatted the diff
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149762/new/
https://reviews.llvm.org/D149762
Files:
llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Index: llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -2798,10 +2798,9 @@
if (MI.isDebugValue()) {
auto *DILocalVar = MI.getDebugVariable();
- // TODO: This should not happen, have to fix the MIR verifier to check for
- // such instances and fix them.
- if (!DILocalVar)
- continue;
+ assert(DILocalVar &&
+ "DBG_VALUE or DBG_VALUE_LIST must contain a DILocalVariable");
+
auto DbgVar = createDebugVariableFromMachineInstr(&MI);
// If the first operand is a register and it exists in the RegisterMap, we
// know this is a DBG_VALUE that uses the result of a load that was moved,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149762.519117.patch
Type: text/x-patch
Size: 823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230503/410f62c9/attachment.bin>
More information about the llvm-commits
mailing list