From: Dmitri Gribenko Date: Tue, 14 Apr 2015 03:49:53 +0000 (+0000) Subject: LinkAllPasses.h: also link in parts of libLLVMSupport X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=32439e7d8822d0d62b3954cc3afe91e5b826db8a;p=oota-llvm.git LinkAllPasses.h: also link in parts of libLLVMSupport When a loadable (.so or .dylib) pass is built with assertions enabled and loaded into the 'opt' tool, we need to ensure that the extra symbols that such passes depend on are linked into the tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234851 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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. }