lto_codegen_set_assembler_args(lto_code_gen_t cg, const char **args,
int nargs);
-/**
- * If set, then codegen will export all symbols (e.g. the internalize
- * pass won't run).
- */
-extern void
-lto_codegen_set_export_dynamic(lto_code_gen_t cg, bool val);
-
/**
* Adds to a list of all global symbols that must exist in the final
* generated code. If a function is not listed, it might be
: _context(getGlobalContext()),
_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
- _exportDynamic(false), _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
+ _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
_nativeObjectFile(NULL) {
InitializeAllTargets();
InitializeAllTargetMCs();
LLVMCompilerUsed->setSection("llvm.metadata");
- if (!_exportDynamic)
- passes.add(createInternalizePass(mustPreserveList));
+ passes.add(createInternalizePass(mustPreserveList));
// apply scope restrictions
passes.run(*mergedModule);
// keeps only main if it exists and does nothing for libraries. Instead
// we create the pass ourselves with the symbol list provided by the linker.
PassManagerBuilder().populateLTOPassManager(passes,
- /*Internalize=*/
- // FIXME: remove 'false' once
- // Darwin linker can pass this
- // option.
- // <rdar://problem/12839986>
- false /*!_exportDynamic*/,
+ /*Internalize=*/false,
!DisableInline,
DisableGVNLoadPRE);
bool setCodePICModel(lto_codegen_model, std::string &errMsg);
void setCpu(const char* mCpu) { _mCpu = mCpu; }
- void setExportDynamic(bool V) { _exportDynamic = V; }
void addMustPreserveSymbol(const char* sym) {
_mustPreserveSymbols[sym] = 1;
llvm::TargetMachine* _target;
bool _emitDwarfDebugInfo;
bool _scopeRestrictionsDone;
- bool _exportDynamic;
lto_codegen_model _codeModel;
StringSet _mustPreserveSymbols;
StringSet _asmUndefinedRefs;
// In here only for backwards compatibility. We use MC now.
}
-/// lto_codegen_set_export_dynamic - If set, then codegen will export all
-/// symbols (e.g. the internalize pass won't run).
-void lto_codegen_set_export_dynamic(lto_code_gen_t cg, bool val) {
- cg->setExportDynamic(val);
-}
-
/// lto_codegen_add_must_preserve_symbol - Adds to a list of all global symbols
/// that must exist in the final generated code. If a function is not listed
/// there, it might be inlined into every usage and optimized away.
lto_codegen_set_assembler_args
lto_codegen_set_assembler_path
lto_codegen_set_cpu
-lto_codegen_set_export_dynamic
lto_codegen_compile_to_file
LLVMCreateDisasm
LLVMCreateDisasmCPU