mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
TargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c88d072293
commit
5d067fe158
@ -55,7 +55,7 @@ namespace llvm {
|
||||
|
||||
typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT);
|
||||
|
||||
typedef const MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T,
|
||||
typedef MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T,
|
||||
StringRef TT);
|
||||
typedef TargetMachine *(*TargetMachineCtorTy)(const Target &T,
|
||||
const std::string &TT,
|
||||
@ -68,7 +68,7 @@ namespace llvm {
|
||||
typedef TargetAsmLexer *(*AsmLexerCtorTy)(const Target &T,
|
||||
const MCAsmInfo &MAI);
|
||||
typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T,MCAsmParser &P);
|
||||
typedef const MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T);
|
||||
typedef MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T);
|
||||
typedef MCInstPrinter *(*MCInstPrinterCtorTy)(const Target &T,
|
||||
unsigned SyntaxVariant,
|
||||
const MCAsmInfo &MAI,
|
||||
@ -184,7 +184,7 @@ namespace llvm {
|
||||
/// feature set; it should always be provided. Generally this should be
|
||||
/// either the target triple from the module, or the target triple of the
|
||||
/// host if that does not exist.
|
||||
const MCAsmInfo *createAsmInfo(StringRef Triple) const {
|
||||
MCAsmInfo *createAsmInfo(StringRef Triple) const {
|
||||
if (!AsmInfoCtorFn)
|
||||
return 0;
|
||||
return AsmInfoCtorFn(*this, Triple);
|
||||
@ -241,7 +241,7 @@ namespace llvm {
|
||||
return AsmPrinterCtorFn(OS, TM, Streamer);
|
||||
}
|
||||
|
||||
const MCDisassembler *createMCDisassembler() const {
|
||||
MCDisassembler *createMCDisassembler() const {
|
||||
if (!MCDisassemblerCtorFn)
|
||||
return 0;
|
||||
return MCDisassemblerCtorFn(*this);
|
||||
@ -529,7 +529,7 @@ namespace llvm {
|
||||
TargetRegistry::RegisterAsmInfo(T, &Allocator);
|
||||
}
|
||||
private:
|
||||
static const MCAsmInfo *Allocator(const Target &T, StringRef TT) {
|
||||
static MCAsmInfo *Allocator(const Target &T, StringRef TT) {
|
||||
return new MCAsmInfoImpl(T, TT);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
static const MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
switch (TheTriple.getOS()) {
|
||||
case Triple::Darwin:
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
using namespace llvm;
|
||||
|
||||
static const MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
|
||||
if (TheTriple.getOS() == Triple::Darwin)
|
||||
|
@ -459,11 +459,11 @@ static void translateInstruction(MCInst &mcInst,
|
||||
}
|
||||
}
|
||||
|
||||
static const MCDisassembler *createX86_32Disassembler(const Target &T) {
|
||||
static MCDisassembler *createX86_32Disassembler(const Target &T) {
|
||||
return new X86Disassembler::X86_32Disassembler;
|
||||
}
|
||||
|
||||
static const MCDisassembler *createX86_64Disassembler(const Target &T) {
|
||||
static MCDisassembler *createX86_64Disassembler(const Target &T) {
|
||||
return new X86Disassembler::X86_64Disassembler;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
static const MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
switch (TheTriple.getOS()) {
|
||||
case Triple::Darwin:
|
||||
|
Loading…
Reference in New Issue
Block a user