const AsmToken &getTok();
/// \brief Report an error at the current lexer location.
- bool TokError(const char *Msg);
+ bool TokError(const Twine &Msg);
/// ParseIdentifier - Parse an identifier or string (as a quoted identifier)
/// and set \arg Res to the identifier contents.
#include "llvm/Support/SMLoc.h"
namespace llvm {
+class Twine;
/// \brief Generic interface for extending the MCAsmParser,
/// which is implemented by target and object file assembly parser
bool Error(SMLoc L, const Twine &Msg) {
return getParser().Error(L, Msg);
}
+ bool TokError(const Twine &Msg) {
+ return getParser().TokError(Msg);
+ }
const AsmToken &Lex() { return getParser().Lex(); }
const AsmToken &getTok() { return getParser().getTok(); }
- bool TokError(const char *Msg) {
- return getParser().TokError(Msg);
- }
-
/// @}
};
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
+#include "llvm/ADT/Twine.h"
using namespace llvm;
namespace {
return getLexer().getTok();
}
-bool MCAsmParser::TokError(const char *Msg) {
+bool MCAsmParser::TokError(const Twine &Msg) {
Error(getLexer().getLoc(), Msg);
return true;
}