Merge pull request #1126 from ncos/native-knl

Fix bug in cbackend
This commit is contained in:
Dmitry Babokin
2015-11-23 21:26:42 +03:00

View File

@@ -4199,8 +4199,9 @@ void CWriter::visitCallInst(llvm::CallInst &I) {
#else /* LLVM 3.3+ */
const llvm::AttributeSet &PAL = I.getAttributes();
#endif
bool hasByVal = I.hasByValArgument();
bool isStructRet = I.hasStructRetAttr();
bool isStructRet = (I.getNumArgOperands() > 0) && I.hasStructRetAttr();
if (isStructRet) {
writeOperandDeref(I.getArgOperand(0));
Out << " = ";