Re-submit r294826 "Fix -Wsign-compare" reverted in r294842 by mistake.

Fix -Wsign-compare - this might not be quite right, but preserves behavior

llvm-svn: 294868
This commit is contained in:
Vitaly Buka 2017-02-11 19:39:05 +00:00
parent cafc256fd4
commit 579ca307ab
2 changed files with 2 additions and 5 deletions

View File

@ -116,9 +116,7 @@ XRayLogFlushStatus fdrLoggingFlush() XRAY_NEVER_INSTRUMENT {
XRayFileHeader Header;
Header.Version = 1;
Header.Type = FileTypes::FDR_LOG;
auto TSCFrequency = getTSCFrequency();
Header.CycleFrequency =
TSCFrequency == -1 ? 0 : static_cast<uint64_t>(TSCFrequency);
Header.CycleFrequency = getTSCFrequency();
// FIXME: Actually check whether we have 'constant_tsc' and 'nonstop_tsc'
// before setting the values in the header.
Header.ConstantTSC = 1;

View File

@ -86,8 +86,7 @@ static int __xray_OpenLogFile() XRAY_NEVER_INSTRUMENT {
XRayFileHeader Header;
Header.Version = 1;
Header.Type = FileTypes::NAIVE_LOG;
Header.CycleFrequency =
TSCFrequency == -1 ? 0 : static_cast<uint64_t>(TSCFrequency);
Header.CycleFrequency = TSCFrequency;
// FIXME: Actually check whether we have 'constant_tsc' and 'nonstop_tsc'
// before setting the values in the header.