r229264 - Replace snprintf with a Twine. NFC.
Benjamin Kramer
benny.kra at googlemail.com
Sat Feb 14 10:19:56 PST 2015
Author: d0k
Date: Sat Feb 14 12:19:55 2015
New Revision: 229264
URL: http://llvm.org/viewvc/llvm-project?rev=229264&view=rev
Log:
Replace snprintf with a Twine. NFC.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=229264&r1=229263&r2=229264&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Feb 14 12:19:55 2015
@@ -34,7 +34,6 @@
#include "llvm/Support/Compression.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/Format.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
@@ -3977,10 +3976,9 @@ void Clang::ConstructJob(Compilation &C,
llvm::sys::fs::file_status Status;
if (llvm::sys::fs::status(A->getValue(), Status))
D.Diag(diag::err_drv_no_such_file) << A->getValue();
- char TimeStamp[48];
- snprintf(TimeStamp, sizeof(TimeStamp), "-fbuild-session-timestamp=%" PRIu64,
- (uint64_t)Status.getLastModificationTime().toEpochTime());
- CmdArgs.push_back(Args.MakeArgString(TimeStamp));
+ CmdArgs.push_back(Args.MakeArgString(
+ "-fbuild-session-timestamp=" +
+ Twine((uint64_t)Status.getLastModificationTime().toEpochTime())));
}
if (Args.getLastArg(options::OPT_fmodules_validate_once_per_build_session)) {
More information about the cfe-commits
mailing list