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

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: 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
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 1b577500f442916361a0bcba52aae331944bfb7e..b8078408253a6af58affc16e6092acea25aa16f5 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -27,6 +27,8 @@
#include "IceOperand.h"
#include "IceRegAlloc.h"
+#define CONCAT_TOKENS(a, b) a##b
John 2016/03/12 17:43:13 This is always invoked as CONCAT_TOKENS(Target_,
Jim Stichnoth 2016/03/12 18:22:44 Done.
+
// 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 CONCAT_TOKENS(Target_, 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 CONCAT_TOKENS(Target_, 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 CONCAT_TOKENS(Target_, 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 CONCAT_TOKENS(Target_, X): \
return ::X::createTargetHeaderLowering(Ctx);
-#include "llvm/Config/SZTargets.def"
+#include "SZTargets.def"
#undef SUBZERO_TARGET
}
}
« Makefile.standalone ('K') | « src/IceCompileServer.cpp ('k') | src/SZTargets.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698