forked from OSchip/llvm-project
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. llvm-svn: 234851
This commit is contained in:
parent
537b4a8159
commit
d81be6d664
|
@ -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 <cstdlib>
|
||||
|
||||
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.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue