From e2b7021a915546765f6a63333ae9f54916a774c1 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 18 Mar 2016 22:35:58 +0000 Subject: [PATCH] [sancov] Fix the sancov pass to initialize itself inside its constructor. This should fix the recent crashes on certain architectures. llvm-svn: 263845 --- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 5b7bb2f..3d27f6b 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -152,7 +152,9 @@ class SanitizerCoverageModule : public ModulePass { public: SanitizerCoverageModule( const SanitizerCoverageOptions &Options = SanitizerCoverageOptions()) - : ModulePass(ID), Options(OverrideFromCL(Options)) {} + : ModulePass(ID), Options(OverrideFromCL(Options)) { + initializeSanitizerCoverageModulePass(*PassRegistry::getPassRegistry()); + } bool runOnModule(Module &M) override; bool runOnFunction(Function &F); static char ID; // Pass identification, replacement for typeid -- 2.7.4