[llvm-commits] [llvm] r135269 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp utils/TableGen/InstrInfoEmitter.cpp utils/TableGen/RegisterInfoEmitter.cpp utils/TableGen/SubtargetEmitter.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Fri Jul 15 05:50:21 PDT 2011
Author: chapuni
Date: Fri Jul 15 07:50:21 2011
New Revision: 135269
URL: http://llvm.org/viewvc/llvm-project?rev=135269&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
llvm/trunk/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp
llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=135269&r1=135268&r2=135269&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Fri Jul 15 07:50:21 2011
@@ -72,7 +72,7 @@
///
namespace llvm {
-extern const MCInstrDesc ARMInsts[];
+extern MCInstrDesc ARMInsts[];
}
using namespace llvm;
Modified: llvm/trunk/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp?rev=135269&r1=135268&r2=135269&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp Fri Jul 15 07:50:21 2011
@@ -30,7 +30,7 @@
#include "MBlazeGenEDInfo.inc"
namespace llvm {
-extern const MCInstrDesc MBlazeInsts[];
+extern MCInstrDesc MBlazeInsts[];
}
using namespace llvm;
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=135269&r1=135268&r2=135269&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Fri Jul 15 07:50:21 2011
@@ -239,7 +239,7 @@
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, "
Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=135269&r1=135268&r2=135269&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Fri Jul 15 07:50:21 2011
@@ -659,7 +659,7 @@
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"
Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=135269&r1=135268&r2=135269&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Fri Jul 15 07:50:21 2011
@@ -720,13 +720,13 @@
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, "
More information about the llvm-commits
mailing list