OSDN Git Service

Fix an assert to check exactly what it says.
authorJay Foad <jay.foad@gmail.com>
Sun, 24 Apr 2011 14:30:00 +0000 (14:30 +0000)
committerJay Foad <jay.foad@gmail.com>
Sun, 24 Apr 2011 14:30:00 +0000 (14:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130093 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index e255d50..11a014a 100644 (file)
@@ -88,7 +88,7 @@ enum PrefixType {
 /// 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;