[cfe-commits] r118496 - /cfe/trunk/lib/Lex/PPMacroExpansion.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Mon Nov 8 22:27:32 PST 2010
Author: chapuni
Date: Tue Nov 9 00:27:32 2010
New Revision: 118496
URL: http://llvm.org/viewvc/llvm-project?rev=118496&view=rev
Log:
lib/Lex/PPMacroExpansion.cpp: Fixup to appease MSVC.
Confirmed on MSVS10.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=118496&r1=118495&r2=118496&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Nov 9 00:27:32 2010
@@ -512,7 +512,11 @@
PP.CreateString(TmpBuffer, strlen(TmpBuffer), TmpTok);
DATELoc = TmpTok.getLocation();
+#ifdef LLVM_ON_WIN32
+ sprintf(TmpBuffer, "\"%02d:%02d:%02d\"", TM->tm_hour, TM->tm_min, TM->tm_sec);
+#else
snprintf(TmpBuffer, sizeof(TmpBuffer), "\"%02d:%02d:%02d\"", TM->tm_hour, TM->tm_min, TM->tm_sec);
+#endif
PP.CreateString(TmpBuffer, strlen(TmpBuffer), TmpTok);
TIMELoc = TmpTok.getLocation();
}
More information about the cfe-commits
mailing list