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

View File

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

View File

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

View File

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