When did we change these to bool? They used to be int before, no?<span></span><br><br>On Wednesday, October 23, 2013, Reid Kleckner  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Isn't the LTO API supposed to be ABI-stable?  Could this be an ABI breaking change?</div><div><br><br><div>On Wed, Oct 23, 2013 at 10:56 AM, NAKAMURA Takumi <span dir="ltr"><<a>geek4civic@gmail.com</a>></span> wrote:<br>

<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: chapuni<br>
Date: Wed Oct 23 12:56:46 2013<br>
New Revision: 193255<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=193255&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=193255&view=rev</a><br>
Log:<br>
llvm-c/lto.h: Avoid use of bool.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm-c/lto.h<br>
    llvm/trunk/tools/lto/lto.cpp<br>
<br>
Modified: llvm/trunk/include/llvm-c/lto.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/lto.h?rev=193255&r1=193254&r2=193255&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/lto.h?rev=193255&r1=193254&r2=193255&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/include/llvm-c/lto.h (original)<br>
+++ llvm/trunk/include/llvm-c/lto.h Wed Oct 23 12:56:46 2013<br>
@@ -16,9 +16,6 @@<br>
 #ifndef LLVM_C_LTO_H<br>
 #define LLVM_C_LTO_H<br>
<br>
-#ifndef __cplusplus<br>
-#include <stdbool.h><br>
-#endif<br>
 #include <stddef.h><br>
 #include <sys/types.h><br>
<br>
@@ -89,14 +86,14 @@ lto_get_error_message(void);<br>
 /**<br>
  * Checks if a file is a loadable object file.<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_module_is_object_file(const char* path);<br>
<br>
<br>
 /**<br>
  * Checks if a file is a loadable object compiled for requested target.<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_module_is_object_file_for_target(const char* path,<br>
                                      const char* target_triple_prefix);<br>
<br>
@@ -104,14 +101,14 @@ lto_module_is_object_file_for_target(con<br>
 /**<br>
  * Checks if a buffer is a loadable object file.<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_module_is_object_file_in_memory(const void* mem, size_t length);<br>
<br>
<br>
 /**<br>
  * Checks if a buffer is a loadable object compiled for requested target.<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_module_is_object_file_in_memory_for_target(const void* mem, size_t length,<br>
                                               const char* target_triple_prefix);<br>
<br>
@@ -210,7 +207,7 @@ lto_codegen_dispose(lto_code_gen_t);<br>
  * Add an object module to the set of modules for which code will be generated.<br>
  * Returns true on error (check lto_get_error_message() for details).<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod);<br>
<br>
<br>
@@ -219,7 +216,7 @@ lto_codegen_add_module(lto_code_gen_t cg<br>
  * Sets if debug info should be generated.<br>
  * Returns true on error (check lto_get_error_message() for details).<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model);<br>
<br>
<br>
@@ -227,7 +224,7 @@ lto_codegen_set_debug_model(lto_code_gen<br>
  * Sets which PIC code model to generated.<br>
  * Returns true on error (check lto_get_error_message() for details).<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model);<br>
<br>
<br>
@@ -273,7 +270,7 @@ extern void lto_codegen_add_dso_symbol(l<br>
  * merged contents of all modules added so far.<br>
  * Returns true on error (check lto_get_error_message() for details).<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_codegen_write_merged_modules(lto_code_gen_t cg, const char* path);<br>
<br>
 /**<br>
@@ -291,7 +288,7 @@ lto_codegen_compile(lto_code_gen_t cg, s<br>
  * Generates code for all added modules into one native object file.<br>
  * The name of the file is written to name. Returns true on error.<br>
  */<br>
-extern bool<br>
+extern int<br>
 lto_codegen_compile_to_file(lto_code_gen_t cg, const char** name);<br>
<br>
<br>
<br>
Modified: llvm/trunk/tools/lto/lto.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=193255&r1=193254&r2=193255&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=193255&r1=193254&r2=193255&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/tools/lto/lto.cpp (original)<br>
+++ llvm/trunk/tools/lto/lto.cpp Wed Oct 23 12:56:46 2013<br>
@@ -90,26 +90,26 @@ const char* lto_get_error_message() {<br>
 }<br>
<br>
 /// lto_module_is_object_file - Validates if a file is a loadable object file.<br>
-bool lto_module_is_object_file(const char* path) {<br>
+int lto_module_is_object_file(const char* path) {<br>
   retu</blockquote></div></div></blockquote>