diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-02 00:31:14 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-02 00:31:14 +0000 |
commit | 0ff993839c4c0ed7da73f240315eb848af647795 (patch) | |
tree | 1803e90774c15f6ebf4ef4c7479ea0112b4ab734 /llvm/tools/lto/lto.cpp | |
parent | 6bab414f87104d9ddcfd91d8b193816abed39a3a (diff) | |
download | bcm5719-llvm-0ff993839c4c0ed7da73f240315eb848af647795.tar.gz bcm5719-llvm-0ff993839c4c0ed7da73f240315eb848af647795.zip |
Maintain the old LTO API, by using the global context.
llvm-svn: 74678
Diffstat (limited to 'llvm/tools/lto/lto.cpp')
-rw-r--r-- | llvm/tools/lto/lto.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp index 02034bbf846..648279834fa 100644 --- a/llvm/tools/lto/lto.cpp +++ b/llvm/tools/lto/lto.cpp @@ -86,10 +86,9 @@ bool lto_module_is_object_file_in_memory_for_target(const void* mem, // loads an object file from disk // returns NULL on error (check lto_get_error_message() for details) // -lto_module_t lto_module_create(const char* path, LLVMContextRef Ctxt) +lto_module_t lto_module_create(const char* path) { - return LTOModule::makeLTOModule(path, *llvm::unwrap(Ctxt), - sLastErrorString); + return LTOModule::makeLTOModule(path, sLastErrorString); } @@ -97,11 +96,9 @@ lto_module_t lto_module_create(const char* path, LLVMContextRef Ctxt) // loads an object file from memory // returns NULL on error (check lto_get_error_message() for details) // -lto_module_t lto_module_create_from_memory(const void* mem, size_t length, - LLVMContextRef Ctxt) +lto_module_t lto_module_create_from_memory(const void* mem, size_t length) { - return LTOModule::makeLTOModule(mem, length, *llvm::unwrap(Ctxt), - sLastErrorString); + return LTOModule::makeLTOModule(mem, length, sLastErrorString); } @@ -158,9 +155,9 @@ lto_symbol_attributes lto_module_get_symbol_attribute(lto_module_t mod, // instantiates a code generator // returns NULL if there is an error // -lto_code_gen_t lto_codegen_create(LLVMContextRef ContextRef) +lto_code_gen_t lto_codegen_create(void) { - return new LTOCodeGenerator(*llvm::unwrap(ContextRef)); + return new LTOCodeGenerator(); } |