Deleted Added
full compact
lto.h (210299) lto.h (212904)
1/*===-- llvm-c/lto.h - LTO Public C Interface ---------------------*- C -*-===*\
2|* *|
3|* The LLVM Compiler Infrastructure *|
4|* *|
5|* This file is distributed under the University of Illinois Open Source *|
6|* License. See LICENSE.TXT for details. *|
7|* *|
8|*===----------------------------------------------------------------------===*|

--- 4 unchanged lines hidden (view full) ---

13|* *|
14\*===----------------------------------------------------------------------===*/
15
16#ifndef LTO_H
17#define LTO_H 1
18
19#include <stdbool.h>
20#include <stddef.h>
1/*===-- llvm-c/lto.h - LTO Public C Interface ---------------------*- C -*-===*\
2|* *|
3|* The LLVM Compiler Infrastructure *|
4|* *|
5|* This file is distributed under the University of Illinois Open Source *|
6|* License. See LICENSE.TXT for details. *|
7|* *|
8|*===----------------------------------------------------------------------===*|

--- 4 unchanged lines hidden (view full) ---

13|* *|
14\*===----------------------------------------------------------------------===*/
15
16#ifndef LTO_H
17#define LTO_H 1
18
19#include <stdbool.h>
20#include <stddef.h>
21#include "llvm/System/DataTypes.h"
21
22#define LTO_API_VERSION 3
23
24typedef enum {
25 LTO_SYMBOL_ALIGNMENT_MASK = 0x0000001F, /* log2 of alignment */
26 LTO_SYMBOL_PERMISSIONS_MASK = 0x000000E0,
27 LTO_SYMBOL_PERMISSIONS_CODE = 0x000000A0,
28 LTO_SYMBOL_PERMISSIONS_DATA = 0x000000C0,

--- 101 unchanged lines hidden (view full) ---

130
131
132/**
133 * Returns triple string which the object module was compiled under.
134 */
135extern const char*
136lto_module_get_target_triple(lto_module_t mod);
137
22
23#define LTO_API_VERSION 3
24
25typedef enum {
26 LTO_SYMBOL_ALIGNMENT_MASK = 0x0000001F, /* log2 of alignment */
27 LTO_SYMBOL_PERMISSIONS_MASK = 0x000000E0,
28 LTO_SYMBOL_PERMISSIONS_CODE = 0x000000A0,
29 LTO_SYMBOL_PERMISSIONS_DATA = 0x000000C0,

--- 101 unchanged lines hidden (view full) ---

131
132
133/**
134 * Returns triple string which the object module was compiled under.
135 */
136extern const char*
137lto_module_get_target_triple(lto_module_t mod);
138
139/**
140 * Sets triple string with which the object will be codegened.
141 */
142extern void
143lto_module_set_target_triple(lto_module_t mod, const char *triple);
138
144
145
139/**
140 * Returns the number of symbols in the object module.
141 */
146/**
147 * Returns the number of symbols in the object module.
148 */
142extern unsigned int
149extern uint32_t
143lto_module_get_num_symbols(lto_module_t mod);
144
145
146/**
147 * Returns the name of the ith symbol in the object module.
148 */
149extern const char*
150lto_module_get_num_symbols(lto_module_t mod);
151
152
153/**
154 * Returns the name of the ith symbol in the object module.
155 */
156extern const char*
150lto_module_get_symbol_name(lto_module_t mod, unsigned int index);
157lto_module_get_symbol_name(lto_module_t mod, uint32_t index);
151
152
153/**
154 * Returns the attributes of the ith symbol in the object module.
155 */
156extern lto_symbol_attributes
158
159
160/**
161 * Returns the attributes of the ith symbol in the object module.
162 */
163extern lto_symbol_attributes
157lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index);
164lto_module_get_symbol_attribute(lto_module_t mod, uint32_t index);
158
159
160/**
161 * Instantiates a code generator.
162 * Returns NULL on error (check lto_get_error_message() for details).
163 */
164extern lto_code_gen_t
165lto_codegen_create(void);

--- 29 unchanged lines hidden (view full) ---

195 * Sets which PIC code model to generated.
196 * Returns true on error (check lto_get_error_message() for details).
197 */
198extern bool
199lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model);
200
201
202/**
165
166
167/**
168 * Instantiates a code generator.
169 * Returns NULL on error (check lto_get_error_message() for details).
170 */
171extern lto_code_gen_t
172lto_codegen_create(void);

--- 29 unchanged lines hidden (view full) ---

202 * Sets which PIC code model to generated.
203 * Returns true on error (check lto_get_error_message() for details).
204 */
205extern bool
206lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model);
207
208
209/**
203 * Sets the location of the "gcc" to run. If not set, libLTO will search for
204 * "gcc" on the path.
210 * Sets the cpu to generate code for.
205 */
206extern void
211 */
212extern void
207lto_codegen_set_gcc_path(lto_code_gen_t cg, const char* path);
213lto_codegen_set_cpu(lto_code_gen_t cg, const char *cpu);
208
209
210/**
211 * Sets the location of the assembler tool to run. If not set, libLTO
212 * will use gcc to invoke the assembler.
213 */
214extern void
215lto_codegen_set_assembler_path(lto_code_gen_t cg, const char* path);
216
214
215
216/**
217 * Sets the location of the assembler tool to run. If not set, libLTO
218 * will use gcc to invoke the assembler.
219 */
220extern void
221lto_codegen_set_assembler_path(lto_code_gen_t cg, const char* path);
222
223/**
224 * Sets extra arguments that libLTO should pass to the assembler.
225 */
226extern void
227lto_codegen_set_assembler_args(lto_code_gen_t cg, const char **args,
228 int nargs);
217
218/**
219 * Adds to a list of all global symbols that must exist in the final
220 * generated code. If a function is not listed, it might be
221 * inlined into every usage and optimized away.
222 */
223extern void
224lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg, const char* symbol);

--- 34 unchanged lines hidden ---
229
230/**
231 * Adds to a list of all global symbols that must exist in the final
232 * generated code. If a function is not listed, it might be
233 * inlined into every usage and optimized away.
234 */
235extern void
236lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg, const char* symbol);

--- 34 unchanged lines hidden ---