[llvm-commits] [llvm] r130093 - /llvm/trunk/lib/VMCore/AsmWriter.cpp

Jay Foad jay.foad at gmail.com
Sun Apr 24 07:30:01 PDT 2011


Author: foad
Date: Sun Apr 24 09:30:00 2011
New Revision: 130093

URL: http://llvm.org/viewvc/llvm-project?rev=130093&view=rev
Log:
Fix an assert to check exactly what it says.

Modified:
    llvm/trunk/lib/VMCore/AsmWriter.cpp

Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=130093&r1=130092&r2=130093&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Sun Apr 24 09:30:00 2011
@@ -88,7 +88,7 @@
 /// prefixed with % (if the string only contains simple characters) or is
 /// surrounded with ""'s (if it has special chars in it).  Print it out.
 static void PrintLLVMName(raw_ostream &OS, StringRef Name, PrefixType Prefix) {
-  assert(Name.data() && "Cannot get empty name!");
+  assert(!Name.empty() && "Cannot get empty name!");
   switch (Prefix) {
   default: llvm_unreachable("Bad prefix!");
   case NoPrefix: break;





More information about the llvm-commits mailing list