diff options
author | Dan Gohman <gohman@apple.com> | 2008-01-29 13:02:09 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-01-29 13:02:09 +0000 |
commit | 303595942502f17c087fa28874c2b89117148c45 (patch) | |
tree | 75e904f611c8a27f2ed75866eb2cabe4e9468141 /lib/Bitcode | |
parent | 9f65c39f806186e1bbe1c9e4b670d198c69a81c1 (diff) | |
download | external_llvm-303595942502f17c087fa28874c2b89117148c45.zip external_llvm-303595942502f17c087fa28874c2b89117148c45.tar.gz external_llvm-303595942502f17c087fa28874c2b89117148c45.tar.bz2 |
Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 2 | ||||
-rw-r--r-- | lib/Bitcode/Reader/Deserialize.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 2d16230..ec71ba4 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1327,7 +1327,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { } case bitc::FUNC_CODE_INST_RET: // RET: [opty,opval<optional>] - if (Record.size() == 0) { + if (Record.empty()) { I = new ReturnInst(); break; } else { diff --git a/lib/Bitcode/Reader/Deserialize.cpp b/lib/Bitcode/Reader/Deserialize.cpp index 3496d24..8455d0e 100644 --- a/lib/Bitcode/Reader/Deserialize.cpp +++ b/lib/Bitcode/Reader/Deserialize.cpp @@ -115,7 +115,7 @@ void Deserializer::ReadRecord() { if (Stream.AtEndOfStream()) return; - assert (Record.size() == 0); + assert (Record.empty()); assert (AbbrevNo >= bitc::UNABBREV_RECORD); RecordCode = Stream.ReadRecord(AbbrevNo,Record); assert (Record.size() > 0); |