Rename interface with more meaningful name.

This commit is contained in:
Vassil Vassilev 2013-10-28 22:13:39 -05:00 committed by sftnight
parent 5209ba0d7f
commit a4c14b87e5
3 changed files with 6 additions and 6 deletions

@ -15,7 +15,7 @@ namespace cling {
return llvm::StringRef(bufStart, getLength()); return llvm::StringRef(bufStart, getLength());
} }
bool Token::getConstant() const { bool Token::getConstantAsBool() const {
assert(kind == tok::constant && "Not a constant"); assert(kind == tok::constant && "Not a constant");
return *bufStart == '1'; return *bufStart == '1';
} }

@ -60,7 +60,7 @@ namespace cling {
bool is(tok::TokenKind K) const { return kind == K; } bool is(tok::TokenKind K) const { return kind == K; }
llvm::StringRef getIdent() const; llvm::StringRef getIdent() const;
bool getConstant() const; bool getConstantAsBool() const;
}; };
class MetaLexer { class MetaLexer {

@ -248,7 +248,7 @@ namespace cling {
consumeToken(); consumeToken();
skipWhitespace(); skipWhitespace();
if (getCurTok().is(tok::constant)) if (getCurTok().is(tok::constant))
mode = (MetaSema::SwitchMode)getCurTok().getConstant(); mode = (MetaSema::SwitchMode)getCurTok().getConstantAsBool();
m_Actions->actOnrawInputCommand(mode); m_Actions->actOnrawInputCommand(mode);
return true; return true;
} }
@ -262,7 +262,7 @@ namespace cling {
consumeToken(); consumeToken();
skipWhitespace(); skipWhitespace();
if (getCurTok().is(tok::constant)) if (getCurTok().is(tok::constant))
mode = (MetaSema::SwitchMode)getCurTok().getConstant(); mode = (MetaSema::SwitchMode)getCurTok().getConstantAsBool();
m_Actions->actOnprintASTCommand(mode); m_Actions->actOnprintASTCommand(mode);
return true; return true;
} }
@ -276,7 +276,7 @@ namespace cling {
consumeToken(); consumeToken();
skipWhitespace(); skipWhitespace();
if (getCurTok().is(tok::constant)) if (getCurTok().is(tok::constant))
mode = (MetaSema::SwitchMode)getCurTok().getConstant(); mode = (MetaSema::SwitchMode)getCurTok().getConstantAsBool();
m_Actions->actOnprintIRCommand(mode); m_Actions->actOnprintIRCommand(mode);
return true; return true;
} }
@ -332,7 +332,7 @@ namespace cling {
consumeToken(); consumeToken();
skipWhitespace(); skipWhitespace();
if (getCurTok().is(tok::constant)) if (getCurTok().is(tok::constant))
mode = (MetaSema::SwitchMode)getCurTok().getConstant(); mode = (MetaSema::SwitchMode)getCurTok().getConstantAsBool();
m_Actions->actOndynamicExtensionsCommand(mode); m_Actions->actOndynamicExtensionsCommand(mode);
return true; return true;
} }