diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
commit | f8af5cf600354830d4ccf59732403f0f073eccb9 (patch) | |
tree | 2ba0398b4c42ad4f55561327538044fd2c925a8b /examples/ExceptionDemo | |
parent | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (diff) |
Diffstat (limited to 'examples/ExceptionDemo')
-rw-r--r-- | examples/ExceptionDemo/ExceptionDemo.cpp | 13 | ||||
-rw-r--r-- | examples/ExceptionDemo/Makefile | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp index f9498a5fbfb3b..d6954e83be4b4 100644 --- a/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/examples/ExceptionDemo/ExceptionDemo.cpp @@ -339,7 +339,7 @@ void deleteOurException(OurUnwindException *expToDelete) { /// This function is the struct _Unwind_Exception API mandated delete function /// used by foreign exception handlers when deleting our exception /// (OurException), instances. -/// @param reason @link http://mentorembedded.github.com/cxx-abi/abi-eh.html +/// @param reason See @link http://mentorembedded.github.com/cxx-abi/abi-eh.html /// @unlink /// @param expToDelete exception instance to delete void deleteFromUnwindOurException(_Unwind_Reason_Code reason, @@ -1562,7 +1562,7 @@ llvm::Function *createUnwindExceptionTest(llvm::Module &module, return(outerCatchFunct); } - +namespace { /// Represents our foreign exceptions class OurCppRunException : public std::runtime_error { public: @@ -1577,9 +1577,9 @@ public: std::runtime_error::operator=(toCopy))); } - ~OurCppRunException (void) throw () {} + virtual ~OurCppRunException (void) throw () {} }; - +} // end anonymous namespace /// Throws foreign C++ exception. /// @param ignoreIt unused parameter that allows function to match implied @@ -1950,7 +1950,6 @@ int main(int argc, char *argv[]) { // If not set, exception handling will not be turned on llvm::TargetOptions Opts; - Opts.JITExceptionHandling = true; llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); @@ -1960,14 +1959,14 @@ int main(int argc, char *argv[]) { // Make the module, which holds all the code. llvm::Module *module = new llvm::Module("my cool jit", context); - llvm::JITMemoryManager *MemMgr = new llvm::SectionMemoryManager(); + llvm::RTDyldMemoryManager *MemMgr = new llvm::SectionMemoryManager(); // Build engine with JIT llvm::EngineBuilder factory(module); factory.setEngineKind(llvm::EngineKind::JIT); factory.setAllocateGVsWithCode(false); factory.setTargetOptions(Opts); - factory.setJITMemoryManager(MemMgr); + factory.setMCJITMemoryManager(MemMgr); factory.setUseMCJIT(true); llvm::ExecutionEngine *executionEngine = factory.create(); diff --git a/examples/ExceptionDemo/Makefile b/examples/ExceptionDemo/Makefile index 480744730eb79..58d9def0b7eea 100644 --- a/examples/ExceptionDemo/Makefile +++ b/examples/ExceptionDemo/Makefile @@ -11,6 +11,6 @@ TOOLNAME = ExceptionDemo EXAMPLE_TOOL = 1 REQUIRES_EH = 1 -LINK_COMPONENTS := jit interpreter nativecodegen +LINK_COMPONENTS := jit mcjit nativecodegen include $(LEVEL)/Makefile.common |