[PATCH] D46966: [lld] Use a real timestamp, with the option to use hash or explicit value
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 11:28:59 PDT 2018
ruiu added inline comments.
================
Comment at: lld/COFF/Config.h:184
uint32_t MinorOSVersion = 0;
+ uint32_t Timestamp = 0;
bool DynamicBase = true;
----------------
Sort
================
Comment at: lld/COFF/Config.h:198
bool KillAt = false;
+ bool TimestampIsHash = false;
};
----------------
Ditto
================
Comment at: lld/COFF/Driver.cpp:1037
+ // Handle /timestamp
+ if (auto *Arg = Args.getLastArg(OPT_timestamp))
+ parseTimestamp(Arg->getValue(), &Config->Timestamp,
----------------
nit: add {}
================
Comment at: lld/COFF/Driver.cpp:1038-1039
+ if (auto *Arg = Args.getLastArg(OPT_timestamp))
+ parseTimestamp(Arg->getValue(), &Config->Timestamp,
+ &Config->TimestampIsHash);
+ else {
----------------
Since Config members are global, you don't need to pass them. Maybe I'd just inline that function here.
================
Comment at: lld/COFF/Writer.cpp:1195
- uint32_t Hash = static_cast<uint32_t>(xxHash64(OutputFileData));
+ uint32_t Timestamp = Config->Timestamp;
+ if (Config->TimestampIsHash)
----------------
Do you need this temporary variable?
https://reviews.llvm.org/D46966
More information about the llvm-commits
mailing list