Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: src/IceTargetLowering.cpp

Issue 1787143002: Subzero: Allow Makefile.standalone to build for a single target. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixed macro Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/SZTargets.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 1b577500f442916361a0bcba52aae331944bfb7e..54d0be4d349224863a3696dca5efdf745781acbc 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -27,6 +27,8 @@
#include "IceOperand.h"
#include "IceRegAlloc.h"
+#define TARGET_LOWERING_CLASS_FOR(t) Target_##t
+
// We prevent target-specific implementation details from leaking outside their
// implementations by forbidding #include of target-specific header files
// anywhere outside their own files. To create target-specific objects
@@ -52,7 +54,7 @@
createTargetHeaderLowering(::Ice::GlobalContext *Ctx); \
void staticInit(::Ice::GlobalContext *Ctx); \
} // end of namespace X
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
namespace Ice {
@@ -250,9 +252,9 @@ TargetLowering::createLowering(TargetArch Target, Cfg *Func) {
default:
badTargetFatalError(Target);
#define SUBZERO_TARGET(X) \
- case Target_##X: \
+ case TARGET_LOWERING_CLASS_FOR(X): \
return ::X::createTargetLowering(Func);
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
}
}
@@ -264,7 +266,7 @@ void TargetLowering::staticInit(GlobalContext *Ctx) {
default:
badTargetFatalError(Target);
#define SUBZERO_TARGET(X) \
- case Target_##X: { \
+ case TARGET_LOWERING_CLASS_FOR(X): { \
static bool InitGuard##X = false; \
if (InitGuard##X) { \
return; \
@@ -272,7 +274,7 @@ void TargetLowering::staticInit(GlobalContext *Ctx) {
InitGuard##X = true; \
::X::staticInit(Ctx); \
} break;
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
}
}
@@ -746,9 +748,9 @@ TargetDataLowering::createLowering(GlobalContext *Ctx) {
default:
badTargetFatalError(Target);
#define SUBZERO_TARGET(X) \
- case Target_##X: \
+ case TARGET_LOWERING_CLASS_FOR(X): \
return ::X::createTargetDataLowering(Ctx);
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
}
}
@@ -877,9 +879,9 @@ TargetHeaderLowering::createLowering(GlobalContext *Ctx) {
default:
badTargetFatalError(Target);
#define SUBZERO_TARGET(X) \
- case Target_##X: \
+ case TARGET_LOWERING_CLASS_FOR(X): \
return ::X::createTargetHeaderLowering(Ctx);
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
}
}
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/SZTargets.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698