Move LTOModule and LTOCodeGenerator to the llvm namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-05-03 14:59:52 +00:00
parent 10e8f9521b
commit dd326086fc
4 changed files with 90 additions and 99 deletions

View File

@ -53,7 +53,6 @@ namespace llvm {
class TargetLibraryInfo;
class TargetMachine;
class raw_ostream;
}
//===----------------------------------------------------------------------===//
/// C++ class which implements the opaque lto_code_gen_t type.
@ -67,7 +66,7 @@ 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);
@ -120,41 +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 Linker;
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