mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Replace string GNU Triples with llvm::Triple in TargetMachine::getTargetTriple(). 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, rengolin Differential Revision: http://reviews.llvm.org/D10381 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -899,7 +899,8 @@ void MipsAsmPrinter::EmitFPCallStub(
|
||||
// freed) and since we're at the global level we can use the default
|
||||
// constructed subtarget.
|
||||
std::unique_ptr<MCSubtargetInfo> STI(TM.getTarget().createMCSubtargetInfo(
|
||||
TM.getTargetTriple(), TM.getTargetCPU(), TM.getTargetFeatureString()));
|
||||
TM.getTargetTriple().str(), TM.getTargetCPU(),
|
||||
TM.getTargetFeatureString()));
|
||||
|
||||
//
|
||||
// .global xxxx
|
||||
|
||||
@@ -1276,7 +1276,8 @@ EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs) {
|
||||
// freed) and since we're at the global level we can use the default
|
||||
// constructed subtarget.
|
||||
std::unique_ptr<MCSubtargetInfo> STI(TM.getTarget().createMCSubtargetInfo(
|
||||
TM.getTargetTriple(), TM.getTargetCPU(), TM.getTargetFeatureString()));
|
||||
TM.getTargetTriple().str(), TM.getTargetCPU(),
|
||||
TM.getTargetFeatureString()));
|
||||
auto EmitToStreamer = [&STI] (MCStreamer &S, const MCInst &Inst) {
|
||||
S.EmitInstruction(Inst, *STI);
|
||||
};
|
||||
|
||||
@@ -98,13 +98,12 @@ static std::string getDataLayoutString(const Triple &T) {
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static std::string computeFSAdditions(StringRef FS, CodeGenOpt::Level OL, StringRef TT) {
|
||||
static std::string computeFSAdditions(StringRef FS, CodeGenOpt::Level OL,
|
||||
const Triple &TT) {
|
||||
std::string FullFS = FS;
|
||||
Triple TargetTriple(TT);
|
||||
|
||||
// Make sure 64-bit features are available when CPUname is generic
|
||||
if (TargetTriple.getArch() == Triple::ppc64 ||
|
||||
TargetTriple.getArch() == Triple::ppc64le) {
|
||||
if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le) {
|
||||
if (!FullFS.empty())
|
||||
FullFS = "+64bit," + FullFS;
|
||||
else
|
||||
@@ -171,8 +170,7 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT,
|
||||
Reloc::Model RM, CodeModel::Model CM,
|
||||
CodeGenOpt::Level OL)
|
||||
: LLVMTargetMachine(T, getDataLayoutString(TT), TT, CPU,
|
||||
computeFSAdditions(FS, OL, TT.str()), Options, RM, CM,
|
||||
OL),
|
||||
computeFSAdditions(FS, OL, TT), Options, RM, CM, OL),
|
||||
TLOF(createTLOF(Triple(getTargetTriple()))),
|
||||
TargetABI(computeTargetABI(TT, Options)) {
|
||||
initAsmInfo();
|
||||
|
||||
@@ -156,7 +156,7 @@ LLVMTargetRef LLVMGetTargetMachineTarget(LLVMTargetMachineRef T) {
|
||||
}
|
||||
|
||||
char* LLVMGetTargetMachineTriple(LLVMTargetMachineRef T) {
|
||||
std::string StringRep = unwrap(T)->getTargetTriple();
|
||||
std::string StringRep = unwrap(T)->getTargetTriple().str();
|
||||
return strdup(StringRep.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user