[compiler-rt] r294826 - Fix -Wsign-compare - this might not be quite right, but preserves behavior
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 22:08:00 PST 2017
Author: dblaikie
Date: Sat Feb 11 00:07:59 2017
New Revision: 294826
URL: http://llvm.org/viewvc/llvm-project?rev=294826&view=rev
Log:
Fix -Wsign-compare - this might not be quite right, but preserves behavior
Modified:
compiler-rt/trunk/lib/xray/xray_fdr_logging.cc
compiler-rt/trunk/lib/xray/xray_inmemory_log.cc
Modified: compiler-rt/trunk/lib/xray/xray_fdr_logging.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_fdr_logging.cc?rev=294826&r1=294825&r2=294826&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_fdr_logging.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_fdr_logging.cc Sat Feb 11 00:07:59 2017
@@ -116,9 +116,7 @@ XRayLogFlushStatus fdrLoggingFlush() XRA
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;
Modified: compiler-rt/trunk/lib/xray/xray_inmemory_log.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_inmemory_log.cc?rev=294826&r1=294825&r2=294826&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_inmemory_log.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_inmemory_log.cc Sat Feb 11 00:07:59 2017
@@ -86,8 +86,7 @@ static int __xray_OpenLogFile() XRAY_NEV
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.
More information about the llvm-commits
mailing list