[PATCH] D73739: Exception support for basic block sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 14:54:46 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1768
+ MCSymbol *ExceptionSym =
+ MBBSectionExceptionSyms.lookup(MBB->getSectionIDNum());
+ if (!ExceptionSym)
----------------
The idiom is to use `try_emplace`. If a new element is inserted, replace it.
```
auto Res = MBBSectionExceptionSyms.try_emplace(MBB->getSectionIDNum());
if (Res.second)
Res.first->second = createTempSymbol("exception");
return Res.first->second;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73739/new/
https://reviews.llvm.org/D73739
More information about the llvm-commits
mailing list