summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native
diff options
context:
space:
mode:
authorKristina Brooks <kristina@nym.hush.com>2018-10-08 09:03:17 +0000
committerKristina Brooks <kristina@nym.hush.com>2018-10-08 09:03:17 +0000
commitbcc86a95c1de0612b829d066261460f53b7d99ec (patch)
treeaf0cfc2d821c823d2edfb337eba07aeddc12a96e /llvm/lib/DebugInfo/PDB/Native
parentfa120cbdbc66935dbe41e4fcc76030d50a2692d4 (diff)
downloadbcm5719-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.cpp2
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;
OpenPOWER on IntegriCloud