Add missing pass initialization

Summary: This was preventing MemorySanitizerLegacyPass from appearing in --print-after-all.

Reviewers: vitalybuka

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79661
This commit is contained in:
Arthur Eubanks 2020-05-08 20:19:05 -07:00
parent 198b0c57df
commit 73a9b7dee0
4 changed files with 13 additions and 4 deletions

View File

@ -305,7 +305,10 @@ public:
explicit HWAddressSanitizerLegacyPass(bool CompileKernel = false,
bool Recover = false)
: FunctionPass(ID), CompileKernel(CompileKernel), Recover(Recover) {}
: FunctionPass(ID), CompileKernel(CompileKernel), Recover(Recover) {
initializeHWAddressSanitizerLegacyPassPass(
*PassRegistry::getPassRegistry());
}
StringRef getPassName() const override { return "HWAddressSanitizer"; }

View File

@ -152,7 +152,9 @@ public:
InstrProfilingLegacyPass() : ModulePass(ID) {}
InstrProfilingLegacyPass(const InstrProfOptions &Options, bool IsCS = false)
: ModulePass(ID), InstrProf(Options, IsCS) {}
: ModulePass(ID), InstrProf(Options, IsCS) {
initializeInstrProfilingLegacyPassPass(*PassRegistry::getPassRegistry());
}
StringRef getPassName() const override {
return "Frontend instrumentation-based coverage lowering";

View File

@ -630,7 +630,9 @@ struct MemorySanitizerLegacyPass : public FunctionPass {
static char ID;
MemorySanitizerLegacyPass(MemorySanitizerOptions Options = {})
: FunctionPass(ID), Options(Options) {}
: FunctionPass(ID), Options(Options) {
initializeMemorySanitizerLegacyPassPass(*PassRegistry::getPassRegistry());
}
StringRef getPassName() const override { return "MemorySanitizerLegacyPass"; }
void getAnalysisUsage(AnalysisUsage &AU) const override {

View File

@ -139,7 +139,9 @@ private:
};
struct ThreadSanitizerLegacyPass : FunctionPass {
ThreadSanitizerLegacyPass() : FunctionPass(ID) {}
ThreadSanitizerLegacyPass() : FunctionPass(ID) {
initializeThreadSanitizerLegacyPassPass(*PassRegistry::getPassRegistry());
}
StringRef getPassName() const override;
void getAnalysisUsage(AnalysisUsage &AU) const override;
bool runOnFunction(Function &F) override;