r198621 - Prospective MSVC 2010 build fix
Alp Toker
alp at nuanti.com
Mon Jan 6 07:52:13 PST 2014
Author: alp
Date: Mon Jan 6 09:52:13 2014
New Revision: 198621
URL: http://llvm.org/viewvc/llvm-project?rev=198621&view=rev
Log:
Prospective MSVC 2010 build fix
Try to fix Compiler Error C2011 following r198607 by removing enum from 'enum
TokenKind' parameter types.
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.h
cfe/trunk/lib/Basic/TokenKinds.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.h?rev=198621&r1=198620&r2=198621&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.h (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.h Mon Jan 6 09:52:13 2014
@@ -54,7 +54,7 @@ enum OnOffSwitch {
///
/// The name of a token will be an internal name (such as "l_square")
/// and should not be used as part of diagnostic messages.
-const char *getTokenName(enum TokenKind Kind) LLVM_READNONE;
+const char *getTokenName(TokenKind Kind) LLVM_READNONE;
/// \brief Determines the spelling of simple punctuation tokens like
/// '!' or '%', and returns NULL for literal and annotation tokens.
@@ -63,11 +63,11 @@ const char *getTokenName(enum TokenKind
/// and will not produce any alternative spellings (e.g., a
/// digraph). For the actual spelling of a given Token, use
/// Preprocessor::getSpelling().
-const char *getPunctuatorSpelling(enum TokenKind Kind) LLVM_READNONE;
+const char *getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE;
/// \brief Determines the spelling of simple keyword and contextual keyword
/// tokens like 'int' and 'dynamic_cast'. Returns NULL for other token kinds.
-const char *getKeywordSpelling(enum TokenKind Kind) LLVM_READNONE;
+const char *getKeywordSpelling(TokenKind Kind) LLVM_READNONE;
/// \brief Return true if this is a raw identifier or an identifier kind.
inline bool isAnyIdentifier(TokenKind K) {
Modified: cfe/trunk/lib/Basic/TokenKinds.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TokenKinds.cpp?rev=198621&r1=198620&r2=198621&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/TokenKinds.cpp (original)
+++ cfe/trunk/lib/Basic/TokenKinds.cpp Mon Jan 6 09:52:13 2014
@@ -22,14 +22,14 @@ static const char * const TokNames[] = {
0
};
-const char *tok::getTokenName(enum TokenKind Kind) {
+const char *tok::getTokenName(TokenKind Kind) {
if (Kind < tok::NUM_TOKENS)
return TokNames[Kind];
llvm_unreachable("unknown TokenKind");
return 0;
}
-const char *tok::getPunctuatorSpelling(enum TokenKind Kind) {
+const char *tok::getPunctuatorSpelling(TokenKind Kind) {
switch (Kind) {
#define PUNCTUATOR(X,Y) case X: return Y;
#include "clang/Basic/TokenKinds.def"
@@ -38,7 +38,7 @@ const char *tok::getPunctuatorSpelling(e
return 0;
}
-const char *tok::getKeywordSpelling(enum TokenKind Kind) {
+const char *tok::getKeywordSpelling(TokenKind Kind) {
switch (Kind) {
#define KEYWORD(X,Y) case kw_ ## X: return #X;
#include "clang/Basic/TokenKinds.def"
More information about the cfe-commits
mailing list