summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-02-23 00:35:18 +0000
committerDevang Patel <dpatel@apple.com>2008-02-23 00:35:18 +0000
commit59643e575fe0a69b543311459f0ab64aa2f5506e (patch)
tree2e273e1fffa6da6208ea5c33968e20bf8c29d41c /llvm/lib/VMCore/AsmWriter.cpp
parent4f5cb4cdac00c35c677f6a83e16032f6705e9996 (diff)
downloadbcm5719-llvm-59643e575fe0a69b543311459f0ab64aa2f5506e.tar.gz
bcm5719-llvm-59643e575fe0a69b543311459f0ab64aa2f5506e.zip
To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.
llvm-svn: 47508
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 5194af3723d..8a7eec9b048 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -1304,23 +1304,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
Out << " }";
writeOperand(I.getOperand(0), false);
Out << ", " << cast<GetResultInst>(I).getIndex();
- } else if (isa<ReturnInst>(I)) {
- if (!Operand)
- Out << " void";
- else {
- if (I.getOperand(0)->getType()->isFirstClassType())
- writeOperand(I.getOperand(0), true);
- else {
- Constant *ROp = cast<Constant>(I.getOperand(0));
- const StructType *STy = cast<StructType>(ROp->getType());
- unsigned NumElems = STy->getNumElements();
- for (unsigned i = 0; i < NumElems; ++i) {
- if (i)
- Out << ",";
- writeOperand(ROp->getOperand(i), true);
- }
- }
- }
+ } else if (isa<ReturnInst>(I) && !Operand) {
+ Out << " void";
} else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
// Print the calling convention being used.
switch (CI->getCallingConv()) {
OpenPOWER on IntegriCloud