Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 //===- subzero/src/IceRevision.cpp - Revision string embedding ------------===// | |
| 2 // | |
| 3 // The Subzero Code Generator | |
| 4 // | |
| 5 // This file is distributed under the University of Illinois Open Source | |
| 6 // License. See LICENSE.TXT for details. | |
| 7 // | |
| 8 //===----------------------------------------------------------------------===// | |
| 9 /// | |
| 10 /// \file | |
| 11 /// \brief Implements the function for returning the Subzero revision string. | |
| 12 /// | |
| 13 //===----------------------------------------------------------------------===// | |
| 14 | |
| 15 #include "IceRevision.h" | |
| 16 | |
| 17 #define XSTRINGIFY(x) STRINGIFY(x) | |
|
John
2016/08/08 11:47:28
why the indirection? XSTRINGIFY could just #x its
Jim Stichnoth
2016/08/08 14:46:18
I think this is one of the oddities of the preproc
John
2016/08/08 14:55:36
Oh, yeah! STRINGFY(x) #x stringfies x without expa
Jim Stichnoth
2016/08/08 17:48:09
Yeah - I kind of prefer dealing with quotes in the
| |
| 18 #define STRINGIFY(x) #x | |
| 19 | |
| 20 #ifndef SUBZERO_REVISION | |
| 21 #define SUBZERO_REVISION unknown | |
| 22 #endif // !SUBZERO_REVISION | |
| 23 | |
| 24 namespace Ice { | |
| 25 const char *getSubzeroRevision() { | |
| 26 return "Subzero_revision_" XSTRINGIFY(SUBZERO_REVISION); | |
| 27 } | |
| 28 } | |
| OLD | NEW |