[cfe-commits] r39013 - /cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:26:49 PDT 2007


Author: sabre
Date: Wed Jul 11 11:26:49 2007
New Revision: 39013

URL: http://llvm.org/viewvc/llvm-project?rev=39013&view=rev
Log:
Fix regression in my last commit

Modified:
    cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Modified: cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=39013&r1=39012&r2=39013&view=diff

==============================================================================
--- cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/cfe/trunk/Driver/PrintPreprocessedOutput.cpp Wed Jul 11 11:26:49 2007
@@ -299,7 +299,9 @@
     // Avoid spelling identifiers, the most common form of token.
     FirstChar = II->getName()[0];
   } else if (Tok.getLength() < 256) {
-    FirstChar = Buffer[0];
+    const char *TokPtr = Buffer;
+    PP.getSpelling(Tok, TokPtr);
+    FirstChar = TokPtr[0];
   } else {
     FirstChar = PP.getSpelling(Tok)[0];
   }





More information about the cfe-commits mailing list