summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-01 22:04:38 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-01 22:04:38 +0000
commite91473c3c02da4a46736e038295e6d015f8eed79 (patch)
treef40a9aca67366b0b8328a6b99edf26eb263d859b /llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
parentcfc01154c3853ecb10c7974b4a388192becf5d32 (diff)
downloadbcm5719-llvm-e91473c3c02da4a46736e038295e6d015f8eed79.tar.gz
bcm5719-llvm-e91473c3c02da4a46736e038295e6d015f8eed79.zip
chrono: address post commit comments from Howard
Drawing some inspiration from code from Bill O'Neal as pointed out by Howard, rework the code to avoid an overflow in the duration. Adjust the style to match libc++ style as well. Create a local typedef for the FILETIME duration (100-ns units). Use this to define the difference between the NT and the UNIX epochs (which previously overflowed due to the representation limits due to the bouncing to ns). Return the FILETIME duration biased by the NT-to-UNIX epoch conversion. Use of the custom duration makes it easier to read and reason about the code. llvm-svn: 290806
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud