OSDN Git Service

[NFC] Derive from PassInfoMixin for no-op/printing passes
authorArthur Eubanks <aeubanks@google.com>
Thu, 9 Jul 2020 23:49:48 +0000 (16:49 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 9 Jul 2020 23:58:30 +0000 (16:58 -0700)
commit8039d2c3bf14585ef37dc9343bf393ecad9aead9
treed973c6814b38ffb7a6746a5de2f7806247efe0f1
parente296e9dfd6ceade1271e48a0afacd1a4826676be
[NFC] Derive from PassInfoMixin for no-op/printing passes

PassInfoMixin should be used for all NPM passes, rater than a custom
`name()`.

This caused ambiguous references in LegacyPassManager.cpp, so had to
remove "using namespace llvm::legacy" and move some things around.

The passes had to be moved to the llvm namespace, or else they would get
printed as "(anonymous namespace)::FooPass".

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D83498
llvm/include/llvm/IR/IRPrintingPasses.h
llvm/lib/IR/LegacyPassManager.cpp
llvm/lib/Passes/PassBuilder.cpp