avoid an extraneous std::string construction
authorChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:24:08 +0000 (07:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:24:08 +0000 (07:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54875 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index ad7b5c3ffe3f83a2c821ab122b10fc0c6bcb8242..cf29b5a10473896d38e13092545e75ead688ade8 100644 (file)
@@ -1141,7 +1141,7 @@ void AssemblyWriter::printFunction(const Function *F) {
   const FunctionType *FT = F->getFunctionType();
   const PAListPtr &Attrs = F->getParamAttrs();
   printType(F->getReturnType()) << ' ';
-  if (!F->getName().empty())
+  if (F->hasName())
     PrintLLVMName(Out, F);
   else
     Out << "@\"\"";