forked from OSchip/llvm-project
lib/Lex/PPMacroExpansion.cpp: Fixup to appease MSVC.
Confirmed on MSVS10. llvm-svn: 118496
This commit is contained in:
parent
229bebdeb5
commit
c0d7d99cc1
|
@ -512,7 +512,11 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc,
|
|||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue