diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2014-06-20 10:26:56 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2014-06-20 10:26:56 +0000 |
commit | ed4e8a839f0604b51eb03f47b6cd467917162e89 (patch) | |
tree | 368959549ffb289cf6d428aeb506c73d1e8d0e6b /lib/IR | |
parent | e5241cc48858af7c6ca58ae677b69323e8f84eb5 (diff) | |
download | llvm-ed4e8a839f0604b51eb03f47b6cd467917162e89.tar.gz llvm-ed4e8a839f0604b51eb03f47b6cd467917162e89.tar.bz2 llvm-ed4e8a839f0604b51eb03f47b6cd467917162e89.tar.xz |
The count() function for STL datatypes returns unsigned, even where it's
only 1/0 result like std::set. Some of the LLVM ADT already return unsigned
count(), while others still return bool count().
In continuation to r197879, this patch modifies DenseMap, DenseSet,
ScopedHashTable, ValueMap:: count() to return size_type instead of bool,
1 instead of true and 0 instead of false.
size_type is typedef-ed locally within each class to size_t.
http://reviews.llvm.org/D4018
Reviewed by dblaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Metadata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp index 4d932d0396..59137e47fa 100644 --- a/lib/IR/Metadata.cpp +++ b/lib/IR/Metadata.cpp @@ -663,7 +663,7 @@ void Instruction::setMetadata(unsigned KindID, MDNode *Node) { // Otherwise, we're removing metadata from an instruction. assert((hasMetadataHashEntry() == - getContext().pImpl->MetadataStore.count(this)) && + (getContext().pImpl->MetadataStore.count(this) > 0)) && "HasMetadata bit out of date!"); if (!hasMetadataHashEntry()) return; // Nothing to remove! |