Implement LowerOperationWrapper for legalizer.
[oota-llvm.git] / include / llvm-c / lto.h
index 8d4590b6753edb69b1337e7cdbc42bf0c51ff197..74a070342e96d02057112c284f47105c92ca0858 100644 (file)
@@ -30,9 +30,10 @@ typedef enum {
     LTO_SYMBOL_DEFINITION_TENTATIVE   = 0x00000200,    
     LTO_SYMBOL_DEFINITION_WEAK        = 0x00000300,    
     LTO_SYMBOL_DEFINITION_UNDEFINED   = 0x00000400,    
-    LTO_SYMBOL_SCOPE_MASK             = 0x00001800,    
+    LTO_SYMBOL_SCOPE_MASK             = 0x00003800,    
     LTO_SYMBOL_SCOPE_INTERNAL         = 0x00000800,    
     LTO_SYMBOL_SCOPE_HIDDEN           = 0x00001000,    
+    LTO_SYMBOL_SCOPE_PROTECTED        = 0x00002000,    
     LTO_SYMBOL_SCOPE_DEFAULT          = 0x00001800    
 } lto_symbol_attributes;
 
@@ -63,14 +64,14 @@ extern "C" {
  * Returns a printable string.
  */
 extern const char*
-lto_get_version();
+lto_get_version(void);
 
 
 /**
  * Returns the last error string or NULL if last operation was sucessful.
  */
 extern const char*
-lto_get_error_message();
+lto_get_error_message(void);
 
 
 /**
@@ -160,7 +161,7 @@ lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index);
  * Returns NULL on error (check lto_get_error_message() for details).
  */
 extern lto_code_gen_t
-lto_codegen_create();
+lto_codegen_create(void);
 
 
 /**
@@ -218,14 +219,20 @@ lto_codegen_write_merged_modules(lto_code_gen_t cg, const char* path);
 /**
  * Generates code for all added modules into one native object file.
  * On sucess returns a pointer to a generated mach-o/ELF buffer and
- * length set to the buffer size.  Client owns the buffer and should
- * free() it when done.
+ * length set to the buffer size.  The buffer is owned by the 
+ * lto_code_gen_t and will be freed when lto_codegen_dispose()
+ * is called, or lto_codegen_compile() is called again.
  * On failure, returns NULL (check lto_get_error_message() for details).
  */
-extern void*
+extern const void*
 lto_codegen_compile(lto_code_gen_t cg, size_t* length);
 
 
+/**
+ * Sets options to help debug codegen bugs.
+ */
+extern void
+lto_codegen_debug_options(lto_code_gen_t cg, const char *);
 #ifdef __cplusplus
 }
 #endif