Don't use size() when you mean empty()
authorChris Lattner <sabre@nondot.org>
Fri, 28 May 2004 05:40:19 +0000 (05:40 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 May 2004 05:40:19 +0000 (05:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13876 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index b7d71812400dcf403515e0e63c3fbda2c2e6c202..6465944272240b98dbebcb907c08c91757ae6c86 100644 (file)
@@ -54,8 +54,7 @@ Type::Type(const std::string &name, PrimitiveID id)
 
 void Type::setName(const std::string &Name, SymbolTable *ST) {
   assert(ST && "Type::setName - Must provide symbol table argument!");
-
-  if (Name.size()) ST->insert(Name, this);
+  if (!Name.empty()) ST->insert(Name, this);
 }