Chromium Code Reviews| Index: src/IceRevision.h |
| diff --git a/src/IceRevision.h b/src/IceRevision.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7a8c7f2f2c926f1a6bd0a1a6dfd67c80f500c770 |
| --- /dev/null |
| +++ b/src/IceRevision.h |
| @@ -0,0 +1,31 @@ |
| +//===- subzero/src/IceRevision.h - Revision string embedding ----*- C++ -*-===// |
| +// |
| +// The Subzero Code Generator |
| +// |
| +// This file is distributed under the University of Illinois Open Source |
| +// License. See LICENSE.TXT for details. |
| +// |
| +//===----------------------------------------------------------------------===// |
| +/// |
| +/// \file |
| +/// \brief Declares the function for returning the Subzero revision string. |
| +/// |
| +//===----------------------------------------------------------------------===// |
| + |
| +#ifndef SUBZERO_SRC_ICEREVISION_H |
| +#define SUBZERO_SRC_ICEREVISION_H |
| + |
| +namespace Ice { |
| + |
| +// Returns the Subzero revision string, which is meant to be essentially the git |
| +// hash of the repo when Subzero was built. |
| +// |
| +// Note: It would be possible to declare this a constexpr char * and put its |
|
John
2016/08/08 11:47:28
nit: constexpr char[] -- :P
Jim Stichnoth
2016/08/08 14:46:18
Done.
|
| +// definition right here in the include file. But since the git hash is passed |
| +// to the compiler on the command line, and compilation is directed through a |
| +// Makefile, lack of recompilation could lead to different files seeing |
| +// inconsistent revision strings. |
| +const char *getSubzeroRevision(); |
| +} |
|
John
2016/08/08 11:47:28
// namespace Ice
Jim Stichnoth
2016/08/08 14:46:18
Done.
|
| + |
| +#endif // SUBZERO_SRC_ICEREVISION_H |