[llvm] r241193 - [WebAssembly] Define separate Target instances for 32-bit and 64-bit.
Dan Gohman
dan433584 at gmail.com
Wed Jul 1 14:42:35 PDT 2015
Author: djg
Date: Wed Jul 1 16:42:34 2015
New Revision: 241193
URL: http://llvm.org/viewvc/llvm-project?rev=241193&view=rev
Log:
[WebAssembly] Define separate Target instances for 32-bit and 64-bit.
Modified:
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp
llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp?rev=241193&r1=241192&r2=241193&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp Wed Jul 1 16:42:34 2015
@@ -46,7 +46,7 @@ createWebAssemblyMCInstPrinter(const Tri
// Force static initialization.
extern "C" void LLVMInitializeWebAssemblyTargetMC() {
- for (Target *T : {&TheWebAssemblyTarget}) {
+ for (Target *T : {&TheWebAssemblyTarget32, &TheWebAssemblyTarget64}) {
// Register the MC asm info.
RegisterMCAsmInfoFn X(*T, createWebAssemblyMCAsmInfo);
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h?rev=241193&r1=241192&r2=241193&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h Wed Jul 1 16:42:34 2015
@@ -35,7 +35,8 @@ class Target;
class Triple;
class raw_ostream;
-extern Target TheWebAssemblyTarget;
+extern Target TheWebAssemblyTarget32;
+extern Target TheWebAssemblyTarget64;
MCAsmBackend *createWebAssemblyAsmBackend(const Target &T,
const MCRegisterInfo &MRI,
Modified: llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp?rev=241193&r1=241192&r2=241193&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/TargetInfo/WebAssemblyTargetInfo.cpp Wed Jul 1 16:42:34 2015
@@ -19,11 +19,12 @@ using namespace llvm;
#define DEBUG_TYPE "wasm-target-info"
-Target llvm::TheWebAssemblyTarget;
+Target llvm::TheWebAssemblyTarget32;
+Target llvm::TheWebAssemblyTarget64;
extern "C" void LLVMInitializeWebAssemblyTargetInfo() {
- RegisterTarget<Triple::wasm32> X(TheWebAssemblyTarget, "wasm32",
+ RegisterTarget<Triple::wasm32> X(TheWebAssemblyTarget32, "wasm32",
"WebAssembly 32-bit");
- RegisterTarget<Triple::wasm64> Y(TheWebAssemblyTarget, "wasm64",
+ RegisterTarget<Triple::wasm64> Y(TheWebAssemblyTarget64, "wasm64",
"WebAssembly 64-bit");
}
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp?rev=241193&r1=241192&r2=241193&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp Wed Jul 1 16:42:34 2015
@@ -30,7 +30,8 @@ using namespace llvm;
extern "C" void LLVMInitializeWebAssemblyTarget() {
// Register the target.
- RegisterTargetMachine<WebAssemblyTargetMachine> X(TheWebAssemblyTarget);
+ RegisterTargetMachine<WebAssemblyTargetMachine> X(TheWebAssemblyTarget32);
+ RegisterTargetMachine<WebAssemblyTargetMachine> Y(TheWebAssemblyTarget64);
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list