[PATCH] D64888: Use the MachineBasicBlock symbol for a callbr target
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 15:12:39 PDT 2019
nickdesaulniers added a comment.
In D64888#1590354 <https://reviews.llvm.org/D64888#1590354>, @xbolva00 wrote:
> Thanks
>
> Fixes https://bugs.llvm.org/show_bug.cgi?id=42147 ?
I'm curious too, what exactly this solves, maybe a test will elucidate.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:435
+ const MachineFunction *MF = MI->getParent()->getParent();
+ for (auto I = MF->begin(), E = MF->end(); I != E; ++I)
+ if (BB == I->getBasicBlock()) {
----------------
range based for?
```
for (const MachineBasicBlock& MBB : MF)
...
```
might even be able to replace `MF` with the expression above and still fit on 80 lines.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64888/new/
https://reviews.llvm.org/D64888
More information about the llvm-commits
mailing list