mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Replace string GNU Triples with llvm::Triple in computeDataLayout(). NFC.
Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, jfb, rengolin Differential Revision: http://reviews.llvm.org/D10361 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -44,12 +44,11 @@ extern "C" void LLVMInitializeMipsTarget() {
|
||||
RegisterTargetMachine<MipselTargetMachine> B(TheMips64elTarget);
|
||||
}
|
||||
|
||||
static std::string computeDataLayout(StringRef TT, StringRef CPU,
|
||||
static std::string computeDataLayout(const Triple &TT, StringRef CPU,
|
||||
const TargetOptions &Options,
|
||||
bool isLittle) {
|
||||
std::string Ret = "";
|
||||
MipsABIInfo ABI =
|
||||
MipsABIInfo::computeTargetABI(Triple(TT), CPU, Options.MCOptions);
|
||||
MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions);
|
||||
|
||||
// There are both little and big endian mips.
|
||||
if (isLittle)
|
||||
@ -88,8 +87,9 @@ MipsTargetMachine::MipsTargetMachine(const Target &T, StringRef TT,
|
||||
const TargetOptions &Options,
|
||||
Reloc::Model RM, CodeModel::Model CM,
|
||||
CodeGenOpt::Level OL, bool isLittle)
|
||||
: LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT,
|
||||
CPU, FS, Options, RM, CM, OL),
|
||||
: LLVMTargetMachine(T,
|
||||
computeDataLayout(Triple(TT), CPU, Options, isLittle),
|
||||
TT, CPU, FS, Options, RM, CM, OL),
|
||||
isLittle(isLittle), TLOF(make_unique<MipsTargetObjectFile>()),
|
||||
ABI(MipsABIInfo::computeTargetABI(Triple(TT), CPU, Options.MCOptions)),
|
||||
Subtarget(nullptr),
|
||||
|
Reference in New Issue
Block a user