diff options
Diffstat (limited to 'contrib/llvm/tools/lto/lto.cpp')
-rw-r--r-- | contrib/llvm/tools/lto/lto.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lto/lto.cpp b/contrib/llvm/tools/lto/lto.cpp index cc841bd..3d7ef0a 100644 --- a/contrib/llvm/tools/lto/lto.cpp +++ b/contrib/llvm/tools/lto/lto.cpp @@ -120,6 +120,14 @@ const char* lto_module_get_target_triple(lto_module_t mod) return mod->getTargetTriple(); } +// +// sets triple string with which the object will be codegened. +// +void lto_module_set_target_triple(lto_module_t mod, const char *triple) +{ + return mod->setTargetTriple(triple); +} + // // returns the number of symbols in the object module @@ -142,7 +150,7 @@ const char* lto_module_get_symbol_name(lto_module_t mod, uint32_t index) // returns the attributes of the ith symbol in the object module // lto_symbol_attributes lto_module_get_symbol_attribute(lto_module_t mod, - uint32_t index) + uint32_t index) { return mod->getSymbolAttributes(index); } @@ -203,6 +211,14 @@ bool lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model model) } // +// sets the cpu to generate code for +// +void lto_codegen_set_cpu(lto_code_gen_t cg, const char* cpu) +{ + return cg->setCpu(cpu); +} + +// // sets the path to the assembler tool // void lto_codegen_set_assembler_path(lto_code_gen_t cg, const char* path) @@ -210,6 +226,16 @@ void lto_codegen_set_assembler_path(lto_code_gen_t cg, const char* path) cg->setAssemblerPath(path); } + +// +// sets extra arguments that libLTO should pass to the assembler +// +void lto_codegen_set_assembler_args(lto_code_gen_t cg, const char** args, + int nargs) +{ + cg->setAssemblerArgs(args, nargs); +} + // // adds to a list of all global symbols that must exist in the final // generated code. If a function is not listed there, it might be |