diff options
author | Kristina Brooks <kristina@nym.hush.com> | 2018-10-08 09:03:17 +0000 |
---|---|---|
committer | Kristina Brooks <kristina@nym.hush.com> | 2018-10-08 09:03:17 +0000 |
commit | bcc86a95c1de0612b829d066261460f53b7d99ec (patch) | |
tree | af0cfc2d821c823d2edfb337eba07aeddc12a96e /llvm/lib/DebugInfo/PDB/Native | |
parent | fa120cbdbc66935dbe41e4fcc76030d50a2692d4 (diff) | |
download | bcm5719-llvm-bcc86a95c1de0612b829d066261460f53b7d99ec.tar.gz bcm5719-llvm-bcc86a95c1de0612b829d066261460f53b7d99ec.zip |
[DebugInfo][PDB] Fix a signed/unsigned coversion warning
Fix the following warning when compiling with clang (caused by commit
rL343951):
GlobalsStream.cpp:61:33: warning: comparison of integers of different
signs: 'int' and 'uint32_t'
This also avoids double evaluation of `GlobalsTable.HashBuckets.size()`.
llvm-svn: 343957
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp b/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp index b8c1feaeb3b..529f6703789 100644 --- a/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp @@ -58,7 +58,7 @@ GlobalsStream::findRecordsByName(StringRef Name, uint32_t ChainStartOffset = GlobalsTable.HashBuckets[CompressedBucketIndex]; uint32_t NextChainStart = GlobalsTable.HashBuckets.size(); - if (CompressedBucketIndex + 1 < GlobalsTable.HashBuckets.size()) + if (static_cast<uint32_t>(CompressedBucketIndex + 1) < NextChainStart) NextChainStart = GlobalsTable.HashBuckets[CompressedBucketIndex + 1]; ChainStartOffset /= 12; NextChainStart /= 12; |