diff options
Diffstat (limited to 'examples/ExceptionDemo/ExceptionDemo.cpp')
-rw-r--r-- | examples/ExceptionDemo/ExceptionDemo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index d6954e83be4b..24e538cacf20 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -48,7 +48,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/Verifier.h" +#include "llvm/IR/Verifier.h" #include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/IR/DataLayout.h" @@ -915,7 +915,7 @@ void generateStringPrint(llvm::LLVMContext &context, new llvm::GlobalVariable(module, stringConstant->getType(), true, - llvm::GlobalValue::LinkerPrivateLinkage, + llvm::GlobalValue::PrivateLinkage, stringConstant, ""); } @@ -959,7 +959,7 @@ void generateIntegerPrint(llvm::LLVMContext &context, new llvm::GlobalVariable(module, stringConstant->getType(), true, - llvm::GlobalValue::LinkerPrivateLinkage, + llvm::GlobalValue::PrivateLinkage, stringConstant, ""); } @@ -1976,7 +1976,8 @@ int main(int argc, char *argv[]) { // Set up the optimizer pipeline. // Start with registering info about how the // target lays out data structures. - fpm.add(new llvm::DataLayout(*executionEngine->getDataLayout())); + module->setDataLayout(executionEngine->getDataLayout()); + fpm.add(new llvm::DataLayoutPass(module)); // Optimizations turned on #ifdef ADD_OPT_PASSES |