| OLD | NEW |
| 1 //===-lto.cpp - LLVM Link Time Optimizer ----------------------------------===// | 1 //===-lto.cpp - LLVM Link Time Optimizer ----------------------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file implements the Link Time Optimization library. This library is | 10 // This file implements the Link Time Optimization library. This library is |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 delete cg; | 198 delete cg; |
| 199 } | 199 } |
| 200 | 200 |
| 201 /// lto_codegen_add_module - Add an object module to the set of modules for | 201 /// lto_codegen_add_module - Add an object module to the set of modules for |
| 202 /// which code will be generated. Returns true on error (check | 202 /// which code will be generated. Returns true on error (check |
| 203 /// lto_get_error_message() for details). | 203 /// lto_get_error_message() for details). |
| 204 bool lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod) { | 204 bool lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod) { |
| 205 return cg->addModule(mod, sLastErrorString); | 205 return cg->addModule(mod, sLastErrorString); |
| 206 } | 206 } |
| 207 | 207 |
| 208 // @LOCALMOD-BEGIN |
| 209 bool lto_codegen_gather_module_for_link(lto_code_gen_t cg, lto_module_t mod) { |
| 210 return cg->gatherModuleForLinking(mod); |
| 211 } |
| 212 |
| 213 bool lto_codegen_link_gathered_modules_and_dispose(lto_code_gen_t cg) { |
| 214 return cg->linkGatheredModulesAndDispose(sLastErrorString); |
| 215 } |
| 216 // @LOCALMOD-END |
| 217 |
| 208 /// lto_codegen_set_debug_model - Sets what if any format of debug info should | 218 /// lto_codegen_set_debug_model - Sets what if any format of debug info should |
| 209 /// be generated. Returns true on error (check lto_get_error_message() for | 219 /// be generated. Returns true on error (check lto_get_error_message() for |
| 210 /// details). | 220 /// details). |
| 211 bool lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model debug) { | 221 bool lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model debug) { |
| 212 return cg->setDebugInfo(debug, sLastErrorString); | 222 return cg->setDebugInfo(debug, sLastErrorString); |
| 213 } | 223 } |
| 214 | 224 |
| 215 /// lto_codegen_set_pic_model - Sets what code model to generated. Returns true | 225 /// lto_codegen_set_pic_model - Sets what code model to generated. Returns true |
| 216 /// on error (check lto_get_error_message() for details). | 226 /// on error (check lto_get_error_message() for details). |
| 217 bool lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model model) { | 227 bool lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model model) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 /// error. | 346 /// error. |
| 337 bool lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name) { | 347 bool lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name) { |
| 338 return cg->compile_to_file(name, sLastErrorString); | 348 return cg->compile_to_file(name, sLastErrorString); |
| 339 } | 349 } |
| 340 | 350 |
| 341 /// lto_codegen_debug_options - Used to pass extra options to the code | 351 /// lto_codegen_debug_options - Used to pass extra options to the code |
| 342 /// generator. | 352 /// generator. |
| 343 void lto_codegen_debug_options(lto_code_gen_t cg, const char *opt) { | 353 void lto_codegen_debug_options(lto_code_gen_t cg, const char *opt) { |
| 344 cg->setCodeGenDebugOptions(opt); | 354 cg->setCodeGenDebugOptions(opt); |
| 345 } | 355 } |
| 346 | |
| OLD | NEW |