diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 10:21:05 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 10:21:05 +0000 |
commit | 7ea33e53c78e6fb9ca96ece5a884d6e86e2f0e4f (patch) | |
tree | 513bf2486a0b30c34e6f29e3734d6581f530051e /examples/ExceptionDemo | |
parent | 417c5c172ce0d56105112481b1bcf0bc2fc011c2 (diff) |
[PM] Update the examples to reflect the removal of the
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
Diffstat (limited to 'examples/ExceptionDemo')
-rw-r--r-- | examples/ExceptionDemo/ExceptionDemo.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index 6822152a5f5..317a326cb9f 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -1122,14 +1122,11 @@ static llvm::BasicBlock *createCatchBlock(llvm::LLVMContext &context, /// @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"); @@ -1389,13 +1386,11 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module, /// @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; @@ -1508,10 +1503,10 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos, /// @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; @@ -1971,7 +1966,7 @@ int main(int argc, char *argv[]) { 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 |