The count() function for STL datatypes returns unsigned, even where it's
authorYaron Keren <yaron.keren@gmail.com>
Fri, 20 Jun 2014 10:26:56 +0000 (10:26 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 20 Jun 2014 10:26:56 +0000 (10:26 +0000)
commited4e8a839f0604b51eb03f47b6cd467917162e89
tree368959549ffb289cf6d428aeb506c73d1e8d0e6b
parente5241cc48858af7c6ca58ae677b69323e8f84eb5
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
14 files changed:
include/llvm/ADT/BitVector.h
include/llvm/ADT/DenseMap.h
include/llvm/ADT/DenseSet.h
include/llvm/ADT/MapVector.h
include/llvm/ADT/ScopedHashTable.h
include/llvm/ADT/SmallBitVector.h
include/llvm/ADT/SmallPtrSet.h
include/llvm/ADT/SmallSet.h
include/llvm/ADT/SparseBitVector.h
include/llvm/ADT/SparseMultiSet.h
include/llvm/ADT/SparseSet.h
include/llvm/IR/ValueMap.h
lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
lib/IR/Metadata.cpp