本文整理汇总了C++中lto_code_gen_t类的典型用法代码示例。如果您正苦于以下问题:C++ lto_code_gen_t类的具体用法?C++ lto_code_gen_t怎么用?C++ lto_code_gen_t使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了lto_code_gen_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lto_codegen_write_merged_modules
/// lto_codegen_write_merged_modules - Writes a new file at the specified path
/// 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) {
if (!parsedOptions) {
cg->parseCodeGenDebugOptions();
parsedOptions = true;
}
return !cg->writeMergedModules(path, sLastErrorString);
}
示例2: lto_codegen_compile_to_file
/// lto_codegen_compile_to_file - Generates code for all added modules into one
/// 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) {
if (!parsedOptions) {
cg->parseCodeGenDebugOptions();
parsedOptions = true;
}
return !cg->compile_to_file(name, DisableOpt, DisableInline, DisableGVNLoadPRE,
sLastErrorString);
}
示例3: lto_add_attrs
// Convert the subtarget features into a string to pass to LTOCodeGenerator.
static void lto_add_attrs(lto_code_gen_t cg) {
if (MAttrs.size()) {
std::string attrs;
for (unsigned i = 0; i < MAttrs.size(); ++i) {
if (i > 0)
attrs.append(",");
attrs.append(MAttrs[i]);
}
cg->setAttr(attrs.c_str());
}
}
示例4: lto_codegen_set_pic_model
/// 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) {
cg->setCodePICModel(model);
return false;
}
示例5: lto_codegen_set_debug_model
/// 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) {
cg->setDebugInfo(debug);
return false;
}
示例6: lto_codegen_set_attr
/// lto_codegen_set_attr - Sets the attr to generate code for.
void lto_codegen_set_attr(lto_code_gen_t cg, const char *attr) {
return cg->setAttr(attr);
}
示例7: lto_codegen_write_merged_modules
//
// writes a new file at the specified path 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);
}
示例8: lto_codegen_set_cpu
//
// sets the cpu to generate code for
//
void lto_codegen_set_cpu(lto_code_gen_t cg, const char* cpu)
{
return cg->setCpu(cpu);
}
示例9: 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);
}
示例10: lto_codegen_set_merged_module_output_format
//
// Set the module format for the merged module
//
void lto_codegen_set_merged_module_output_format(lto_code_gen_t cg,
lto_output_format format)
{
cg->setMergedModuleOutputFormat(format);
}
示例11: lto_codegen_link_gathered_modules_and_dispose
bool lto_codegen_link_gathered_modules_and_dispose(lto_code_gen_t cg) {
return cg->linkGatheredModulesAndDispose(sLastErrorString);
}
示例12: lto_codegen_gather_module_for_link
// @LOCALMOD-BEGIN
void lto_codegen_gather_module_for_link(lto_code_gen_t cg, lto_module_t mod) {
cg->gatherModuleForLinking(mod);
}
示例13: lto_codegen_set_internalize_strategy
/// lto_codegen_set_internalize_strategy - Sets the strategy to use during
/// internalize.
void lto_codegen_set_internalize_strategy(lto_code_gen_t cg,
lto_internalize_strategy strategy) {
cg->setInternalizeStrategy(strategy);
}
示例14: lto_codegen_set_diagnostic_handler
/// Set a diagnostic handler.
void lto_codegen_set_diagnostic_handler(lto_code_gen_t cg,
lto_diagnostic_handler_t diag_handler,
void *ctxt) {
cg->setDiagnosticHandler(diag_handler, ctxt);
}
示例15: lto_codegen_set_merged_module_soname
//
// Set the module soname (for shared library bitcode)
//
void lto_codegen_set_merged_module_soname(lto_code_gen_t cg,
const char* soname)
{
cg->setMergedModuleSOName(soname);
}