avoid an extraneous std::string construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-08-17 07:24:08 +00:00
parent fad86b003a
commit 95e4bd81d7

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