diff options
author | Reid Kleckner <rnk@google.com> | 2019-10-30 15:18:21 -0700 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-10-30 15:20:43 -0700 |
commit | 22d41ba024fa08026ebd85ec842712fcf780ca2a (patch) | |
tree | 509f4c2f11704d810aeacc9f16a4f2da4a62dd2a /llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp | |
parent | 1c88d662230e79bc2dd2283d753d950c1ad0bed6 (diff) | |
download | bcm5719-llvm-22d41ba024fa08026ebd85ec842712fcf780ca2a.tar.gz bcm5719-llvm-22d41ba024fa08026ebd85ec842712fcf780ca2a.zip |
Fix -Wsign-compare warning with clang-cl
off_t apparently is just "long" on Win64, which is 32-bits, and
therefore not long enough to compare with UINT32_MAX. Use auto to follow
the surrounding code. uint64_t would also be fine.
Diffstat (limited to 'llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp index ad022fec9e3..e234a13fe06 100644 --- a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp +++ b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp @@ -114,7 +114,7 @@ llvm::Expected<uint64_t> FunctionInfo::encode(FileWriter &O) const { llvm::Error err = OptLineTable->encode(O, Range.Start); if (err) return std::move(err); - const off_t Length = O.tell() - StartOffset; + const auto Length = O.tell() - StartOffset; if (Length > UINT32_MAX) return createStringError(std::errc::invalid_argument, "LineTable length is greater than UINT32_MAX"); @@ -132,7 +132,7 @@ llvm::Expected<uint64_t> FunctionInfo::encode(FileWriter &O) const { llvm::Error err = Inline->encode(O, Range.Start); if (err) return std::move(err); - const off_t Length = O.tell() - StartOffset; + const auto Length = O.tell() - StartOffset; if (Length > UINT32_MAX) return createStringError(std::errc::invalid_argument, "InlineInfo length is greater than UINT32_MAX"); |