Fixed method getReturnValue(): it should return NULL if the
callee does not return a value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/MachineInstrAnnot.cpp b/lib/CodeGen/MachineInstrAnnot.cpp
index 960c492..ef06445 100644
--- a/lib/CodeGen/MachineInstrAnnot.cpp
+++ b/lib/CodeGen/MachineInstrAnnot.cpp
@@ -30,3 +30,10 @@
   for (unsigned int i=1; i < numArgs; ++i)
     argInfoVec.push_back(CallArgInfo(callInstr->getOperand(i)));
 }
+
+
+const CallInst*
+CallArgsDescriptor::getReturnValue() const
+{
+  return (callInstr->getType() == Type::VoidTy? NULL : callInstr);
+}