aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/LTO/LTOCodeGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/LTO/LTOCodeGenerator.h')
-rw-r--r--include/llvm/LTO/LTOCodeGenerator.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/include/llvm/LTO/LTOCodeGenerator.h b/include/llvm/LTO/LTOCodeGenerator.h
index 5433991..b19b232 100644
--- a/include/llvm/LTO/LTOCodeGenerator.h
+++ b/include/llvm/LTO/LTOCodeGenerator.h
@@ -53,11 +53,9 @@ namespace llvm {
class TargetLibraryInfo;
class TargetMachine;
class raw_ostream;
-}
//===----------------------------------------------------------------------===//
-/// LTOCodeGenerator - C++ class which implements the opaque lto_code_gen_t
-/// type.
+/// C++ class which implements the opaque lto_code_gen_t type.
///
struct LTOCodeGenerator {
static const char *getVersionString();
@@ -68,11 +66,12 @@ struct LTOCodeGenerator {
// Merge given module, return true on success.
bool addModule(struct LTOModule*, std::string &errMsg);
- void setTargetOptions(llvm::TargetOptions options);
+ void setTargetOptions(TargetOptions options);
void setDebugInfo(lto_debug_model);
void setCodePICModel(lto_codegen_model);
void setCpu(const char *mCpu) { MCpu = mCpu; }
+ void setAttr(const char *mAttr) { MAttr = mAttr; }
void addMustPreserveSymbol(const char *sym) { MustPreserveSymbols[sym] = 1; }
@@ -120,40 +119,37 @@ struct LTOCodeGenerator {
private:
void initializeLTOPasses();
- bool generateObjectFile(llvm::raw_ostream &out,
- bool disableOpt,
- bool disableInline,
- bool disableGVNLoadPRE,
- std::string &errMsg);
+ bool generateObjectFile(raw_ostream &out, bool disableOpt, bool disableInline,
+ bool disableGVNLoadPRE, std::string &errMsg);
void applyScopeRestrictions();
- void applyRestriction(llvm::GlobalValue &GV,
- const llvm::ArrayRef<llvm::StringRef> &Libcalls,
- std::vector<const char*> &MustPreserveList,
- llvm::SmallPtrSet<llvm::GlobalValue*, 8> &AsmUsed,
- llvm::Mangler &Mangler);
+ void applyRestriction(GlobalValue &GV, const ArrayRef<StringRef> &Libcalls,
+ std::vector<const char *> &MustPreserveList,
+ SmallPtrSet<GlobalValue *, 8> &AsmUsed,
+ Mangler &Mangler);
bool determineTarget(std::string &errMsg);
- static void DiagnosticHandler(const llvm::DiagnosticInfo &DI, void *Context);
+ static void DiagnosticHandler(const DiagnosticInfo &DI, void *Context);
- void DiagnosticHandler2(const llvm::DiagnosticInfo &DI);
+ void DiagnosticHandler2(const DiagnosticInfo &DI);
- typedef llvm::StringMap<uint8_t> StringSet;
+ typedef StringMap<uint8_t> StringSet;
- llvm::LLVMContext &Context;
- llvm::Linker Linker;
- llvm::TargetMachine *TargetMach;
+ LLVMContext &Context;
+ Linker IRLinker;
+ TargetMachine *TargetMach;
bool EmitDwarfDebugInfo;
bool ScopeRestrictionsDone;
lto_codegen_model CodeModel;
StringSet MustPreserveSymbols;
StringSet AsmUndefinedRefs;
- llvm::MemoryBuffer *NativeObjectFile;
+ MemoryBuffer *NativeObjectFile;
std::vector<char *> CodegenOptions;
std::string MCpu;
+ std::string MAttr;
std::string NativeObjectPath;
- llvm::TargetOptions Options;
+ TargetOptions Options;
lto_diagnostic_handler_t DiagHandler;
void *DiagContext;
};
-
+}
#endif // LTO_CODE_GENERATOR_H