[PATCH] D83498: [NFC] Derive from PassInfoMixin for no-op/printing passes

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 13:19:03 PDT 2020


aeubanks marked an inline comment as done.
aeubanks added inline comments.


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:300
 
-namespace {
+namespace llvm {
 
----------------
ychen wrote:
> aeubanks wrote:
> > ychen wrote:
> > > How about keeping this local? These are only for testing.
> > Do you mean keeping this in an anonymous namespace?
> > As mentioned in the commit, that makes the printed name messed up.
> Add some regex in lit tests?
> Running pass: {{.*}}NoOpModulePass
> 
I don't see any reason to distinguish it from other passes, even if it's only used for testing. It's a useful tool for sanity checks. Having a `(anonymous namespace)` printed anywhere doesn't look good.
And it'd require updating more tests than I really want to.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83498





More information about the llvm-commits mailing list