[PATCH] D64982: [AsmPrinter] Print label if MBB's address is taken
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 02:31:54 PDT 2019
nickdesaulniers added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:438
MBB.getSymbol()->print(OS, AP->MAI);
+ const_cast<MachineBasicBlock*>(&MBB)->setLabelMustBeEmitted();
break;
----------------
Make `MBB` a non-const `MachineBasicBlock&`, then you can drop the ugly `const_cast` and then also the `&` then `->` and just use `.`.
```
for (MachineBasicBlock& MBB : *MF) {
...
MBB.setLabelMustBeEmitted();
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64982/new/
https://reviews.llvm.org/D64982
More information about the llvm-commits
mailing list