[PATCH] D10725: Improve testing for the C API

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 09:23:15 PST 2016


deadalnix added inline comments.

================
Comment at: tools/llvm-c-test/echo.cpp:82
@@ +81,3 @@
+        LLVMGetParamTypes(Src, Params);
+        for (unsigned i = 0; i < ParamCount; i++) {
+          Params[i] = clone_type(Params[i], Ctx);
----------------
echristo wrote:
> Can you try to explain a different way? I'm not sure what you mean.
Sure. The trick part is that LLVMGetParamTypes require a buffer passed down as a pointer and will fill it all. So we need to create a buffer and fill it. Vector like API do not really lend itself to this.


http://reviews.llvm.org/D10725





More information about the llvm-commits mailing list