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 MCAsmInfo subclasses and create*AsmInfo(). NFC.
Summary: This is the first of several patches to eliminate StringRef forms of GNU triples from the internals of LLVM. After this is complete, GNU triples will be replaced by a more authoratitive representation in the form of an LLVM TargetTuple. Reviewers: rengolin Reviewed By: rengolin Subscribers: ted, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10236 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -18,8 +18,7 @@ using namespace llvm;
|
||||
|
||||
void MipsMCAsmInfo::anchor() { }
|
||||
|
||||
MipsMCAsmInfo::MipsMCAsmInfo(StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) {
|
||||
if ((TheTriple.getArch() == Triple::mips) ||
|
||||
(TheTriple.getArch() == Triple::mips64))
|
||||
IsLittleEndian = false;
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
#include "llvm/MC/MCAsmInfoELF.h"
|
||||
|
||||
namespace llvm {
|
||||
class StringRef;
|
||||
class Triple;
|
||||
|
||||
class MipsMCAsmInfo : public MCAsmInfoELF {
|
||||
void anchor() override;
|
||||
public:
|
||||
explicit MipsMCAsmInfo(StringRef TT);
|
||||
explicit MipsMCAsmInfo(const Triple &TheTriple);
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
@@ -75,7 +75,8 @@ static MCSubtargetInfo *createMipsMCSubtargetInfo(StringRef TT, StringRef CPU,
|
||||
return X;
|
||||
}
|
||||
|
||||
static MCAsmInfo *createMipsMCAsmInfo(const MCRegisterInfo &MRI, StringRef TT) {
|
||||
static MCAsmInfo *createMipsMCAsmInfo(const MCRegisterInfo &MRI,
|
||||
const Triple &TT) {
|
||||
MCAsmInfo *MAI = new MipsMCAsmInfo(TT);
|
||||
|
||||
unsigned SP = MRI.getDwarfRegNum(Mips::SP, true);
|
||||
|
||||
Reference in New Issue
Block a user