llvm/PassManager.h wrapper header and its using declarations. These now
directly use the legacy namespace.
I had updated the #include lines in my large commit but forgot that the
examples weren't being built and didn't update the code to use the
correct namespace. Sorry for the noise here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229095
91177308-0d34-0410-b5e6-
96231b3b80d8
/// @param numExceptionsToCatch length of exceptionTypesToCatch array
/// @param exceptionTypesToCatch array of type info types to "catch"
/// @returns generated function
/// @param numExceptionsToCatch length of exceptionTypesToCatch array
/// @param exceptionTypesToCatch array of type info types to "catch"
/// @returns generated function
-static
-llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
- llvm::IRBuilder<> &builder,
- llvm::FunctionPassManager &fpm,
- llvm::Function &toInvoke,
- std::string ourId,
- unsigned numExceptionsToCatch,
- unsigned exceptionTypesToCatch[]) {
+static llvm::Function *createCatchWrappedInvokeFunction(
+ llvm::Module &module, llvm::IRBuilder<> &builder,
+ llvm::legacy::FunctionPassManager &fpm, llvm::Function &toInvoke,
+ std::string ourId, unsigned numExceptionsToCatch,
+ unsigned exceptionTypesToCatch[]) {
llvm::LLVMContext &context = module.getContext();
llvm::Function *toPrint32Int = module.getFunction("print32Int");
llvm::LLVMContext &context = module.getContext();
llvm::Function *toPrint32Int = module.getFunction("print32Int");
/// @param nativeThrowFunct function which will throw a foreign exception
/// if the above nativeThrowType matches generated function's arg.
/// @returns generated function
/// @param nativeThrowFunct function which will throw a foreign exception
/// if the above nativeThrowType matches generated function's arg.
/// @returns generated function
-static
-llvm::Function *createThrowExceptionFunction(llvm::Module &module,
- llvm::IRBuilder<> &builder,
- llvm::FunctionPassManager &fpm,
- std::string ourId,
- int32_t nativeThrowType,
- llvm::Function &nativeThrowFunct) {
+static llvm::Function *
+createThrowExceptionFunction(llvm::Module &module, llvm::IRBuilder<> &builder,
+ llvm::legacy::FunctionPassManager &fpm,
+ std::string ourId, int32_t nativeThrowType,
+ llvm::Function &nativeThrowFunct) {
llvm::LLVMContext &context = module.getContext();
namedValues.clear();
ArgTypes unwindArgTypes;
llvm::LLVMContext &context = module.getContext();
namedValues.clear();
ArgTypes unwindArgTypes;
/// @param nativeThrowFunctName name of external function which will throw
/// a foreign exception
/// @returns outermost generated test function.
/// @param nativeThrowFunctName name of external function which will throw
/// a foreign exception
/// @returns outermost generated test function.
-llvm::Function *createUnwindExceptionTest(llvm::Module &module,
- llvm::IRBuilder<> &builder,
- llvm::FunctionPassManager &fpm,
- std::string nativeThrowFunctName) {
+llvm::Function *
+createUnwindExceptionTest(llvm::Module &module, llvm::IRBuilder<> &builder,
+ llvm::legacy::FunctionPassManager &fpm,
+ std::string nativeThrowFunctName) {
// Number of type infos to generate
unsigned numTypeInfos = 6;
// Number of type infos to generate
unsigned numTypeInfos = 6;
llvm::ExecutionEngine *executionEngine = factory.create();
{
llvm::ExecutionEngine *executionEngine = factory.create();
{
- llvm::FunctionPassManager fpm(module);
+ llvm::legacy::FunctionPassManager fpm(module);
// Set up the optimizer pipeline.
// Start with registering info about how the
// Set up the optimizer pipeline.
// Start with registering info about how the
}
// Create a function pass manager for this engine
}
// Create a function pass manager for this engine
- FunctionPassManager *FPM = new FunctionPassManager(OpenModule);
+ auto *FPM = new legacy::FunctionPassManager(OpenModule);
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, Value *> NamedValues;
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, Value *> NamedValues;
-static FunctionPassManager *TheFPM;
+static legacy::FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) {
Error(Str);
Value *ErrorV(const char *Str) {
Error(Str);
- FunctionPassManager OurFPM(TheModule);
+ legacy::FunctionPassManager OurFPM(TheModule);
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, Value *> NamedValues;
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, Value *> NamedValues;
-static FunctionPassManager *TheFPM;
+static legacy::FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) {
Error(Str);
Value *ErrorV(const char *Str) {
Error(Str);
- FunctionPassManager OurFPM(TheModule);
+ legacy::FunctionPassManager OurFPM(TheModule);
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, AllocaInst *> NamedValues;
static Module *TheModule;
static IRBuilder<> Builder(getGlobalContext());
static std::map<std::string, AllocaInst *> NamedValues;
-static FunctionPassManager *TheFPM;
+static legacy::FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) {
Error(Str);
Value *ErrorV(const char *Str) {
Error(Str);
- FunctionPassManager OurFPM(TheModule);
+ legacy::FunctionPassManager OurFPM(TheModule);
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
static Module *TheModule;
static std::map<std::string, AllocaInst *> NamedValues;
static Module *TheModule;
static std::map<std::string, AllocaInst *> NamedValues;
-static FunctionPassManager *TheFPM;
+static legacy::FunctionPassManager *TheFPM;
Value *ErrorV(const char *Str) {
Error(Str);
Value *ErrorV(const char *Str) {
Error(Str);
- FunctionPassManager OurFPM(TheModule);
+ legacy::FunctionPassManager OurFPM(TheModule);
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.