[llvm-commits] [llvm] r82911 - in /llvm/trunk/tools/llvm-mc: AsmLexer.cpp AsmLexer.h
Chris Lattner
sabre at nondot.org
Sun Sep 27 12:38:39 PDT 2009
Author: lattner
Date: Sun Sep 27 14:38:39 2009
New Revision: 82911
URL: http://llvm.org/viewvc/llvm-project?rev=82911&view=rev
Log:
avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
Modified:
llvm/trunk/tools/llvm-mc/AsmLexer.cpp
llvm/trunk/tools/llvm-mc/AsmLexer.h
Modified: llvm/trunk/tools/llvm-mc/AsmLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmLexer.cpp?rev=82911&r1=82910&r2=82911&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmLexer.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmLexer.cpp Sun Sep 27 14:38:39 2009
@@ -243,10 +243,8 @@
}
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() {
Modified: llvm/trunk/tools/llvm-mc/AsmLexer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmLexer.h?rev=82911&r1=82910&r2=82911&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmLexer.h (original)
+++ llvm/trunk/tools/llvm-mc/AsmLexer.h Sun Sep 27 14:38:39 2009
@@ -30,7 +30,7 @@
/// AsmLexer - Lexer class for assembly files.
class AsmLexer : public MCAsmLexer {
SourceMgr &SrcMgr;
- const MCAsmInfo MAI;
+ const MCAsmInfo &MAI;
const char *CurPtr;
const MemoryBuffer *CurBuf;
More information about the llvm-commits
mailing list