diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-03 18:43:46 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-03 18:43:46 -0500 |
commit | 0f7c126b9ff549f96746f79139f369ac3c276557 (patch) | |
tree | 34dc4cd57d74a8699a5d3bdebcb73cfa45e395e8 | |
parent | c7399c6d78ca4858756a87b0e93bb773c2580ac3 (diff) |
fix call generation
-rw-r--r-- | lib/Target/CppBackend/CallHandlers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CppBackend/CallHandlers.h b/lib/Target/CppBackend/CallHandlers.h index dda19bcbb6..a5ed6e1ff0 100644 --- a/lib/Target/CppBackend/CallHandlers.h +++ b/lib/Target/CppBackend/CallHandlers.h @@ -14,7 +14,7 @@ CallHandlerMap *CallHandlers; DEF_CALL_HANDLER(__default__, { Type *RT = CI->getType(); std::string text = Name + "("; - if (NumArgs == -1) NumArgs = CI->getNumOperands(); + if (NumArgs == -1) NumArgs = CI->getNumOperands()-1; // last operand is the function itself for (int i = 0; i < NumArgs; i++) { text += getValueAsCastStr(CI->getArgOperand(i)); // FIXME: differentiate ffi calls if (i < NumArgs - 1) text += ", "; |