llvm.org GIT mirror llvm / 168f142
Cleanup whitespace and remove unneeded 'extern' keyword on function definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153802 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 7 years ago
2 changed file(s) with 27 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
3030
3131 typedef enum {
3232 LTO_SYMBOL_ALIGNMENT_MASK = 0x0000001F, /* log2 of alignment */
33 LTO_SYMBOL_PERMISSIONS_MASK = 0x000000E0,
34 LTO_SYMBOL_PERMISSIONS_CODE = 0x000000A0,
35 LTO_SYMBOL_PERMISSIONS_DATA = 0x000000C0,
36 LTO_SYMBOL_PERMISSIONS_RODATA = 0x00000080,
37 LTO_SYMBOL_DEFINITION_MASK = 0x00000700,
38 LTO_SYMBOL_DEFINITION_REGULAR = 0x00000100,
39 LTO_SYMBOL_DEFINITION_TENTATIVE = 0x00000200,
40 LTO_SYMBOL_DEFINITION_WEAK = 0x00000300,
41 LTO_SYMBOL_DEFINITION_UNDEFINED = 0x00000400,
33 LTO_SYMBOL_PERMISSIONS_MASK = 0x000000E0,
34 LTO_SYMBOL_PERMISSIONS_CODE = 0x000000A0,
35 LTO_SYMBOL_PERMISSIONS_DATA = 0x000000C0,
36 LTO_SYMBOL_PERMISSIONS_RODATA = 0x00000080,
37 LTO_SYMBOL_DEFINITION_MASK = 0x00000700,
38 LTO_SYMBOL_DEFINITION_REGULAR = 0x00000100,
39 LTO_SYMBOL_DEFINITION_TENTATIVE = 0x00000200,
40 LTO_SYMBOL_DEFINITION_WEAK = 0x00000300,
41 LTO_SYMBOL_DEFINITION_UNDEFINED = 0x00000400,
4242 LTO_SYMBOL_DEFINITION_WEAKUNDEF = 0x00000500,
43 LTO_SYMBOL_SCOPE_MASK = 0x00003800,
44 LTO_SYMBOL_SCOPE_INTERNAL = 0x00000800,
45 LTO_SYMBOL_SCOPE_HIDDEN = 0x00001000,
46 LTO_SYMBOL_SCOPE_PROTECTED = 0x00002000,
43 LTO_SYMBOL_SCOPE_MASK = 0x00003800,
44 LTO_SYMBOL_SCOPE_INTERNAL = 0x00000800,
45 LTO_SYMBOL_SCOPE_HIDDEN = 0x00001000,
46 LTO_SYMBOL_SCOPE_PROTECTED = 0x00002000,
4747 LTO_SYMBOL_SCOPE_DEFAULT = 0x00001800,
4848 LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN = 0x00002800
4949 } lto_symbol_attributes;
9494 * Checks if a file is a loadable object compiled for requested target.
9595 */
9696 extern bool
97 lto_module_is_object_file_for_target(const char* path,
97 lto_module_is_object_file_for_target(const char* path,
9898 const char* target_triple_prefix);
9999
100100
109109 * Checks if a buffer is a loadable object compiled for requested target.
110110 */
111111 extern bool
112 lto_module_is_object_file_in_memory_for_target(const void* mem, size_t length,
112 lto_module_is_object_file_in_memory_for_target(const void* mem, size_t length,
113113 const char* target_triple_prefix);
114114
115115
270270 /**
271271 * Generates code for all added modules into one native object file.
272272 * On success returns a pointer to a generated mach-o/ELF buffer and
273 * length set to the buffer size. The buffer is owned by the
273 * length set to the buffer size. The buffer is owned by the
274274 * lto_code_gen_t and will be freed when lto_codegen_dispose()
275275 * is called, or lto_codegen_compile() is called again.
276276 * On failure, returns NULL (check lto_get_error_message() for details).
291291 */
292292 extern void
293293 lto_codegen_debug_options(lto_code_gen_t cg, const char *);
294
294295 #ifdef __cplusplus
295296 }
296297 #endif
158158 }
159159
160160 /// lto_codegen_set_cpu - Sets the cpu to generate code for.
161 void lto_codegen_set_cpu(lto_code_gen_t cg, const char* cpu) {
161 void lto_codegen_set_cpu(lto_code_gen_t cg, const char *cpu) {
162162 return cg->setCpu(cpu);
163163 }
164164
169169
170170 /// lto_codegen_set_assembler_args - Sets extra arguments that libLTO should
171171 /// pass to the assembler.
172 void lto_codegen_set_assembler_args(lto_code_gen_t cg, const char** args,
172 void lto_codegen_set_assembler_args(lto_code_gen_t cg, const char **args,
173173 int nargs) {
174174 // In here only for backwards compatibility. We use MC now.
175175 }
178178 /// that must exist in the final generated code. If a function is not listed
179179 /// there, it might be inlined into every usage and optimized away.
180180 void lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg,
181 const char* symbol) {
181 const char *symbol) {
182182 cg->addMustPreserveSymbol(symbol);
183183 }
184184
185185 /// lto_codegen_write_merged_modules - Writes a new file at the specified path
186186 /// that contains the merged contents of all modules added so far. Returns true
187187 /// on error (check lto_get_error_message() for details).
188 bool lto_codegen_write_merged_modules(lto_code_gen_t cg, const char* path) {
188 bool lto_codegen_write_merged_modules(lto_code_gen_t cg, const char *path) {
189189 return cg->writeMergedModules(path, sLastErrorString);
190190 }
191191
195195 /// object and will be freed when lto_codegen_dispose() is called, or
196196 /// lto_codegen_compile() is called again. On failure, returns NULL (check
197197 /// lto_get_error_message() for details).
198 extern const void*
199 lto_codegen_compile(lto_code_gen_t cg, size_t* length) {
198 const void *lto_codegen_compile(lto_code_gen_t cg, size_t *length) {
200199 return cg->compile(length, sLastErrorString);
201200 }
202201
203 extern bool
204 lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name)
205 {
202 /// lto_codegen_compile_to_file - Generates code for all added modules into one
203 /// native object file. The name of the file is written to name. Returns true on
204 /// error.
205 bool lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name) {
206206 return cg->compile_to_file(name, sLastErrorString);
207207 }
208208
209209 /// lto_codegen_debug_options - Used to pass extra options to the code
210210 /// generator.
211 extern void
212 lto_codegen_debug_options(lto_code_gen_t cg, const char * opt) {
211 void lto_codegen_debug_options(lto_code_gen_t cg, const char *opt) {
213212 cg->setCodeGenDebugOptions(opt);
214213 }