forked from OSchip/llvm-project
Eliminate "const" from extern const to fix breakeage since r135184 on msvc.
MSVC decorates (and distinguishes) "const" in mangler. It brought linkage error between "extern const" declarations and definitions. llvm-svn: 135269
This commit is contained in:
parent
b92195852f
commit
cb1a888fde
|
@ -72,7 +72,7 @@
|
||||||
///
|
///
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
extern const MCInstrDesc ARMInsts[];
|
extern MCInstrDesc ARMInsts[];
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "MBlazeGenEDInfo.inc"
|
#include "MBlazeGenEDInfo.inc"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
extern const MCInstrDesc MBlazeInsts[];
|
extern MCInstrDesc MBlazeInsts[];
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
|
@ -239,7 +239,7 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
|
||||||
OS << "#undef GET_INSTRINFO_CTOR\n";
|
OS << "#undef GET_INSTRINFO_CTOR\n";
|
||||||
|
|
||||||
OS << "namespace llvm {\n";
|
OS << "namespace llvm {\n";
|
||||||
OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";
|
OS << "extern MCInstrDesc " << TargetName << "Insts[];\n";
|
||||||
OS << ClassName << "::" << ClassName << "(int SO, int DO)\n"
|
OS << ClassName << "::" << ClassName << "(int SO, int DO)\n"
|
||||||
<< " : TargetInstrInfoImpl(SO, DO) {\n"
|
<< " : TargetInstrInfoImpl(SO, DO) {\n"
|
||||||
<< " InitMCInstrInfo(" << TargetName << "Insts, "
|
<< " InitMCInstrInfo(" << TargetName << "Insts, "
|
||||||
|
|
|
@ -659,7 +659,7 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
|
||||||
OS << " }\n}\n\n";
|
OS << " }\n}\n\n";
|
||||||
|
|
||||||
// Emit the constructor of the class...
|
// Emit the constructor of the class...
|
||||||
OS << "extern const MCRegisterDesc " << TargetName << "RegDesc[];\n";
|
OS << "extern MCRegisterDesc " << TargetName << "RegDesc[];\n";
|
||||||
|
|
||||||
OS << ClassName << "::" << ClassName
|
OS << ClassName << "::" << ClassName
|
||||||
<< "()\n"
|
<< "()\n"
|
||||||
|
|
|
@ -720,13 +720,13 @@ void SubtargetEmitter::run(raw_ostream &OS) {
|
||||||
OS << "#undef GET_SUBTARGETINFO_CTOR\n";
|
OS << "#undef GET_SUBTARGETINFO_CTOR\n";
|
||||||
|
|
||||||
OS << "namespace llvm {\n";
|
OS << "namespace llvm {\n";
|
||||||
OS << "extern const llvm::SubtargetFeatureKV " << Target << "FeatureKV[];\n";
|
OS << "extern llvm::SubtargetFeatureKV " << Target << "FeatureKV[];\n";
|
||||||
OS << "extern const llvm::SubtargetFeatureKV " << Target << "SubTypeKV[];\n";
|
OS << "extern llvm::SubtargetFeatureKV " << Target << "SubTypeKV[];\n";
|
||||||
if (HasItineraries) {
|
if (HasItineraries) {
|
||||||
OS << "extern const llvm::SubtargetInfoKV " << Target << "ProcItinKV[];\n";
|
OS << "extern llvm::SubtargetInfoKV " << Target << "ProcItinKV[];\n";
|
||||||
OS << "extern const llvm::InstrStage " << Target << "Stages[];\n";
|
OS << "extern llvm::InstrStage " << Target << "Stages[];\n";
|
||||||
OS << "extern const unsigned " << Target << "OperandCycles[];\n";
|
OS << "extern unsigned " << Target << "OperandCycles[];\n";
|
||||||
OS << "extern const unsigned " << Target << "ForwardingPathes[];\n";
|
OS << "extern unsigned " << Target << "ForwardingPathes[];\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
OS << ClassName << "::" << ClassName << "(StringRef TT, StringRef CPU, "
|
OS << ClassName << "::" << ClassName << "(StringRef TT, StringRef CPU, "
|
||||||
|
|
Loading…
Reference in New Issue