avoid an extraneous std::string construction

llvm-svn: 54875
This commit is contained in:
Chris Lattner 2008-08-17 07:24:08 +00:00
parent c0610874cc
commit 661710bbd1

View 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 << "@\"\"";