X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FAsmWriter.cpp;h=68cf438e29a55ab9c90ac5789e8ea860845023d0;hb=b5bd026a756d8650f2a94607c9b1dc34cf1c024a;hp=0322d669d325a07d56a16eb6d686ad799c801dc0;hpb=ccd27fb84b0ac13ad1d30b17cbeb87a0ea934154;p=oota-llvm.git diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 0322d669d32..68cf438e29a 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -727,7 +727,6 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, } else { // Cannot output in string format... Out << '['; if (CA->getNumOperands()) { - Out << ' '; printTypeInt(Out, ETy, TypeTable); Out << ' '; WriteAsOperandInternal(Out, CA->getOperand(0), @@ -738,7 +737,6 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, Out << ' '; WriteAsOperandInternal(Out, CA->getOperand(i), TypeTable, Machine); } - Out << ' '; } Out << ']'; } @@ -777,7 +775,7 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, const Type *ETy = CP->getType()->getElementType(); assert(CP->getNumOperands() > 0 && "Number of operands for a PackedConst must be > 0"); - Out << "< "; + Out << '<'; printTypeInt(Out, ETy, TypeTable); Out << ' '; WriteAsOperandInternal(Out, CP->getOperand(0), TypeTable, Machine); @@ -787,7 +785,7 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV, Out << ' '; WriteAsOperandInternal(Out, CP->getOperand(i), TypeTable, Machine); } - Out << " >"; + Out << '>'; return; } @@ -1242,10 +1240,7 @@ void AssemblyWriter::printAlias(const GlobalAlias *GA) { printType(F->getFunctionType()); Out << "* "; - if (F->hasName()) - PrintLLVMName(Out, F); - else - Out << "@\"\""; + WriteAsOperandInternal(Out, F, TypeNames, &Machine); } else if (const GlobalAlias *GA = dyn_cast(Aliasee)) { printType(GA->getType()); Out << " "; @@ -1312,10 +1307,7 @@ void AssemblyWriter::printFunction(const Function *F) { Out << Attribute::getAsString(Attrs.getRetAttributes()) << ' '; printType(F->getReturnType()); Out << ' '; - if (F->hasName()) - PrintLLVMName(Out, F); - else - Out << "@\"\""; + WriteAsOperandInternal(Out, F, TypeNames, &Machine); Out << '('; Machine.incorporateFunction(F);