1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/tools/llvm-cvtres/timestamp.test
Nico Weber f78666fc01 Let writeWindowsResourceCOFF() take a TimeStamp parameter
For lld, pass in Config->Timestamp (which is set based on lld's
/timestamp: and /Brepro flags). Since the writeWindowsResourceCOFF()
data is only used in-memory by LLD and the obj's timestamp isn't used
for anything in the output, this doesn't change behavior.

For llvm-cvtres, add an optional /timestamp: parameter, and use the
current behavior of calling time() if the parameter is not passed in.

This doesn't really change observable behavior (unless someone passes
/timestamp: to llvm-cvtres, which wasn't possible before), but it
removes the last unqualified call to time() from llvm/lib, which seems
like a good thing.

Differential Revision: https://reviews.llvm.org/D63116

llvm-svn: 363050
2019-06-11 11:26:50 +00:00

11 lines
384 B
Plaintext

RUN: llvm-cvtres /timestamp:0x12345678 /out:%t %p/Inputs/test_resource.res
RUN: llvm-readobj -h %t | FileCheck %s --check-prefix=1TO8
1TO8: TimeDateStamp: 1979-09-05 22:51:36 (0x12345678)
RUN: not llvm-cvtres /timestamp:0x123456789 /out:%t \
RUN: %p/Inputs/test_resource.res 2>&1 | FileCheck %s --check-prefix=ERR
ERR: invalid timestamp: 0x123456789. Expected 32-bit integer