Rename interface with more meaningful name.
This commit is contained in:
parent
5209ba0d7f
commit
a4c14b87e5
@ -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';
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user