Index: src/IceRevision.cpp |
diff --git a/src/IceRevision.cpp b/src/IceRevision.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8233d04c0f251501b7c3f1c4c63827424d8ecd4 |
--- /dev/null |
+++ b/src/IceRevision.cpp |
@@ -0,0 +1,28 @@ |
+//===- subzero/src/IceRevision.cpp - Revision string embedding ------------===// |
+// |
+// The Subzero Code Generator |
+// |
+// This file is distributed under the University of Illinois Open Source |
+// License. See LICENSE.TXT for details. |
+// |
+//===----------------------------------------------------------------------===// |
+/// |
+/// \file |
+/// \brief Implements the function for returning the Subzero revision string. |
+/// |
+//===----------------------------------------------------------------------===// |
+ |
+#include "IceRevision.h" |
+ |
+#define XSTRINGIFY(x) STRINGIFY(x) |
+#define STRINGIFY(x) #x |
+ |
+#ifndef SUBZERO_REVISION |
+#define SUBZERO_REVISION unknown |
+#endif // !SUBZERO_REVISION |
+ |
+namespace Ice { |
+const char *getSubzeroRevision() { |
+ return "Subzero_revision_" XSTRINGIFY(SUBZERO_REVISION); |
+} |
+} // end of namespace Ice |