//
//===----------------------------------------------------------------------===//
-#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"
new llvm::GlobalVariable(module,
stringConstant->getType(),
true,
- llvm::GlobalValue::LinkerPrivateLinkage,
+ llvm::GlobalValue::PrivateLinkage,
stringConstant,
"");
}
new llvm::GlobalVariable(module,
stringConstant->getType(),
true,
- llvm::GlobalValue::LinkerPrivateLinkage,
+ llvm::GlobalValue::PrivateLinkage,
stringConstant,
"");
}
return(outerCatchFunct);
}
-
+namespace {
/// Represents our foreign exceptions
class OurCppRunException : public std::runtime_error {
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
// 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