}
bool AsmLexer::isAtStartOfComment(char Char) {
- for (const char *p = MAI.getCommentString(); *p != 0; ++p)
- if (Char == *p)
- return true;
- return false;
+ // FIXME: This won't work for multi-character comment indicators like "//".
+ return Char == *MAI.getCommentString();
}
AsmToken AsmLexer::LexToken() {
/// AsmLexer - Lexer class for assembly files.
class AsmLexer : public MCAsmLexer {
SourceMgr &SrcMgr;
- const MCAsmInfo MAI;
+ const MCAsmInfo &MAI;
const char *CurPtr;
const MemoryBuffer *CurBuf;