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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135269 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2011-07-15 12:50:21 +00:00
parent a4a1671d81
commit 20722b6cda
5 changed files with 10 additions and 10 deletions

View File

@ -72,7 +72,7 @@
///
namespace llvm {
extern const MCInstrDesc ARMInsts[];
extern MCInstrDesc ARMInsts[];
}
using namespace llvm;

View File

@ -30,7 +30,7 @@
#include "MBlazeGenEDInfo.inc"
namespace llvm {
extern const MCInstrDesc MBlazeInsts[];
extern MCInstrDesc MBlazeInsts[];
}
using namespace llvm;

View File

@ -239,7 +239,7 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
OS << "#undef GET_INSTRINFO_CTOR\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"
<< " : TargetInstrInfoImpl(SO, DO) {\n"
<< " InitMCInstrInfo(" << TargetName << "Insts, "

View File

@ -659,7 +659,7 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
OS << " }\n}\n\n";
// Emit the constructor of the class...
OS << "extern const MCRegisterDesc " << TargetName << "RegDesc[];\n";
OS << "extern MCRegisterDesc " << TargetName << "RegDesc[];\n";
OS << ClassName << "::" << ClassName
<< "()\n"

View File

@ -720,13 +720,13 @@ void SubtargetEmitter::run(raw_ostream &OS) {
OS << "#undef GET_SUBTARGETINFO_CTOR\n";
OS << "namespace llvm {\n";
OS << "extern const llvm::SubtargetFeatureKV " << Target << "FeatureKV[];\n";
OS << "extern const llvm::SubtargetFeatureKV " << Target << "SubTypeKV[];\n";
OS << "extern llvm::SubtargetFeatureKV " << Target << "FeatureKV[];\n";
OS << "extern llvm::SubtargetFeatureKV " << Target << "SubTypeKV[];\n";
if (HasItineraries) {
OS << "extern const llvm::SubtargetInfoKV " << Target << "ProcItinKV[];\n";
OS << "extern const llvm::InstrStage " << Target << "Stages[];\n";
OS << "extern const unsigned " << Target << "OperandCycles[];\n";
OS << "extern const unsigned " << Target << "ForwardingPathes[];\n";
OS << "extern llvm::SubtargetInfoKV " << Target << "ProcItinKV[];\n";
OS << "extern llvm::InstrStage " << Target << "Stages[];\n";
OS << "extern unsigned " << Target << "OperandCycles[];\n";
OS << "extern unsigned " << Target << "ForwardingPathes[];\n";
}
OS << ClassName << "::" << ClassName << "(StringRef TT, StringRef CPU, "