diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-09-15 14:08:28 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-09-15 14:08:28 +0000 |
| commit | 153010c52d123a8805502fa9cb64225e7625b5f5 (patch) | |
| tree | 9a28eea3cee3364c89d7c8a67fcdcb9297cab22d /llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp | |
| parent | e6451d9e741bcac0529214850c9b35bf4a3b393b (diff) | |
| download | bcm5719-llvm-153010c52d123a8805502fa9cb64225e7625b5f5.tar.gz bcm5719-llvm-153010c52d123a8805502fa9cb64225e7625b5f5.zip | |
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).
For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.
This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.
This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.
Reviewers: rengolin
Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10969
llvm-svn: 247692
Diffstat (limited to 'llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp')
| -rw-r--r-- | llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp index 7624c7240d6..99d85c5de6a 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp @@ -10,7 +10,7 @@ #include "AArch64.h" #include "AArch64RegisterInfo.h" #include "MCTargetDesc/AArch64FixupKinds.h" -#include "llvm/ADT/Triple.h" +#include "llvm/ADT/TargetTuple.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCDirectives.h" #include "llvm/MC/MCELFObjectWriter.h" @@ -521,23 +521,23 @@ void ELFAArch64AsmBackend::applyFixup(const MCFixup &Fixup, char *Data, MCAsmBackend *llvm::createAArch64leAsmBackend(const Target &T, const MCRegisterInfo &MRI, - const Triple &TheTriple, + const TargetTuple &TT, StringRef CPU) { - if (TheTriple.isOSBinFormatMachO()) + if (TT.isOSBinFormatMachO()) return new DarwinAArch64AsmBackend(T, MRI); - assert(TheTriple.isOSBinFormatELF() && "Expect either MachO or ELF target"); - uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); + assert(TT.isOSBinFormatELF() && "Expect either MachO or ELF target"); + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); return new ELFAArch64AsmBackend(T, OSABI, /*IsLittleEndian=*/true); } MCAsmBackend *llvm::createAArch64beAsmBackend(const Target &T, const MCRegisterInfo &MRI, - const Triple &TheTriple, + const TargetTuple &TT, StringRef CPU) { - assert(TheTriple.isOSBinFormatELF() && + assert(TT.isOSBinFormatELF() && "Big endian is only supported for ELF targets!"); - uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); + uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS()); return new ELFAArch64AsmBackend(T, OSABI, /*IsLittleEndian=*/false); } |

