[PATCH] D137984: [BOLT] Fix state of MCSymbols in lowering pass

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 12:01:55 PST 2022


tschuett added inline comments.


================
Comment at: bolt/lib/Passes/BinaryPasses.cpp:599
+// already defined), clean it.
+void resetMCSymbolState(const MCExpr *Expr) {
+  if (const MCUnaryExpr *UE = dyn_cast<MCUnaryExpr>(Expr)) {
----------------
rafauler wrote:
> tschuett wrote:
> > `static`
> this is under an anonymous namespace
Exactly. You are supposed to use `static` instead of anonymous namespaces. It is about readability. If I look at `resetMCSymbolState`, then I cannot see that it has internal linkage. `static` makes the job simpler.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137984/new/

https://reviews.llvm.org/D137984



More information about the llvm-commits mailing list