1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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 f65d413c3a
commit 1320fee88a
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;