forked from OSchip/llvm-project
parent
8babe3d9c4
commit
6d279d484a
|
@ -20,6 +20,8 @@
|
|||
#include <set>
|
||||
#include <llvm/ADT/hash_map>
|
||||
|
||||
#define LLVM_LTO_VERSION 1
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Module;
|
||||
|
@ -148,6 +150,6 @@ namespace llvm {
|
|||
/// linker to use dlopen() interface to dynamically load LinkTimeOptimizer.
|
||||
/// extern "C" helps, because dlopen() interface uses name to find the symbol.
|
||||
extern "C"
|
||||
llvm::LinkTimeOptimizer *createLLVMOptimizer();
|
||||
llvm::LinkTimeOptimizer *createLLVMOptimizer(unsigned VERSION = LLVM_LTO_VERSION);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -45,8 +45,11 @@
|
|||
using namespace llvm;
|
||||
|
||||
extern "C"
|
||||
llvm::LinkTimeOptimizer *createLLVMOptimizer()
|
||||
llvm::LinkTimeOptimizer *createLLVMOptimizer(unsigned VERSION)
|
||||
{
|
||||
if (VERSION != LLVM_LTO_VERSION)
|
||||
return NULL;
|
||||
|
||||
llvm::LTO *l = new llvm::LTO();
|
||||
return l;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue