diff options
author | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-08-07 05:19:23 +0000 |
---|---|---|
committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-08-07 05:19:23 +0000 |
commit | 235089bdaefabcef9e9cde28eb3b0d8937b12a0d (patch) | |
tree | 88b8c979ccd4438842bee6f85309dee63f7448ad /tools/lto/lto.cpp | |
parent | 51c9043f3bc215bb3026486e5e1ef5989a8d8d8b (diff) | |
download | llvm-235089bdaefabcef9e9cde28eb3b0d8937b12a0d.tar.gz llvm-235089bdaefabcef9e9cde28eb3b0d8937b12a0d.tar.bz2 llvm-235089bdaefabcef9e9cde28eb3b0d8937b12a0d.tar.xz |
Change public functions of LTOCodeGenerator from ret-false-on-succ to ret-true-on-succ.
As of this revision, all functions of LTOCodeGenerator are consistent in
ret-true-on-succ.
Tested on multiple OSes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/lto.cpp')
-rw-r--r-- | tools/lto/lto.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp index e0df81ab20..db7147c2bc 100644 --- a/tools/lto/lto.cpp +++ b/tools/lto/lto.cpp @@ -140,20 +140,22 @@ void lto_codegen_dispose(lto_code_gen_t cg) { /// which code will be generated. Returns true on error (check /// lto_get_error_message() for details). bool lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod) { - return cg->addModule(mod, sLastErrorString); + return !cg->addModule(mod, sLastErrorString); } /// lto_codegen_set_debug_model - Sets what if any format of debug info should /// be generated. Returns true on error (check lto_get_error_message() for /// details). bool lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model debug) { - return cg->setDebugInfo(debug, sLastErrorString); + cg->setDebugInfo(debug); + return false; } /// lto_codegen_set_pic_model - Sets what code model to generated. Returns true /// on error (check lto_get_error_message() for details). bool lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model model) { - return cg->setCodePICModel(model, sLastErrorString); + cg->setCodePICModel(model); + return false; } /// lto_codegen_set_cpu - Sets the cpu to generate code for. @@ -185,7 +187,7 @@ void lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg, /// that contains the merged contents of all modules added so far. Returns true /// on error (check lto_get_error_message() for details). bool lto_codegen_write_merged_modules(lto_code_gen_t cg, const char *path) { - return cg->writeMergedModules(path, sLastErrorString); + return !cg->writeMergedModules(path, sLastErrorString); } /// lto_codegen_compile - Generates code for all added modules into one native @@ -202,7 +204,7 @@ const void *lto_codegen_compile(lto_code_gen_t cg, size_t *length) { /// native object file. The name of the file is written to name. Returns true on /// error. bool lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name) { - return cg->compile_to_file(name, sLastErrorString); + return !cg->compile_to_file(name, sLastErrorString); } /// lto_codegen_debug_options - Used to pass extra options to the code |