mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "llvm/MC/MCCodeGenInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/ValueMap.h"
|
||||
@ -201,6 +202,7 @@ public:
|
||||
CodeGenOpt::Level OptLevel =
|
||||
CodeGenOpt::Default,
|
||||
bool GVsWithCode = true,
|
||||
Reloc::Model RM = Reloc::Default,
|
||||
CodeModel::Model CMM =
|
||||
CodeModel::Default);
|
||||
|
||||
@ -463,6 +465,7 @@ private:
|
||||
CodeGenOpt::Level OptLevel;
|
||||
JITMemoryManager *JMM;
|
||||
bool AllocateGVsWithCode;
|
||||
Reloc::Model RelocModel;
|
||||
CodeModel::Model CMModel;
|
||||
std::string MArch;
|
||||
std::string MCPU;
|
||||
@ -476,6 +479,7 @@ private:
|
||||
OptLevel = CodeGenOpt::Default;
|
||||
JMM = NULL;
|
||||
AllocateGVsWithCode = false;
|
||||
RelocModel = Reloc::Default;
|
||||
CMModel = CodeModel::Default;
|
||||
UseMCJIT = false;
|
||||
}
|
||||
@ -517,6 +521,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// setRelocationModel - Set the relocation model that the ExecutionEngine
|
||||
/// target is using. Defaults to target specific default "Reloc::Default".
|
||||
EngineBuilder &setRelocationModel(Reloc::Model RM) {
|
||||
RelocModel = RM;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// setCodeModel - Set the CodeModel that the ExecutionEngine target
|
||||
/// data is using. Defaults to target specific default "CodeModel::Default".
|
||||
EngineBuilder &setCodeModel(CodeModel::Model M) {
|
||||
@ -569,6 +580,7 @@ public:
|
||||
StringRef MArch,
|
||||
StringRef MCPU,
|
||||
const SmallVectorImpl<std::string>& MAttrs,
|
||||
Reloc::Model RM,
|
||||
std::string *Err);
|
||||
|
||||
ExecutionEngine *create();
|
||||
|
Reference in New Issue
Block a user