diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index d00882d27c4..5fa7f342a43 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -15,6 +15,7 @@ #ifndef LLVM_LINKALLPASSES_H #define LLVM_LINKALLPASSES_H +#include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasSetTracker.h" #include "llvm/Analysis/CallPrinter.h" #include "llvm/Analysis/DomPrinter.h" @@ -35,6 +36,7 @@ #include "llvm/Transforms/Utils/SymbolRewriter.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Transforms/Vectorize.h" +#include "llvm/Support/Valgrind.h" #include namespace { @@ -179,6 +181,8 @@ namespace { ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM); llvm::AliasSetTracker X(*(llvm::AliasAnalysis*)nullptr); X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets + (void) llvm::AreStatisticsEnabled(); + (void) llvm::sys::RunningOnValgrind(); } } ForcePassLinking; // Force link by creating a global definition. }