[PATCH] CppBackend needs to be updated to handle new GetElementPtrInst::Create prototype

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 11:44:38 PDT 2015


Thanks for your patience. I've committed a patch based on this in r247047
(you can see the sort of test case I was referring to in that commit, if
you're interested)

On Mon, Sep 7, 2015 at 5:16 AM, JEROME WITMANN via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Patch to add the missing type to the CppBackend.
>
>
>
> In LLVM 3.7.0, GetElementPtrInst::Create requires the type to be passed
> and the target CppBackend doesn't do so.
>
>
>
> The test case is rather easy, any array access will do it:
>
>
>
> void test(char *str, int idx)
>
> {
>
>  str[idx]=idx;
>
> }
>
>
>
> clang -emit-llvm -c test.c -o tmp.bc
>
> llc -march=cpp tmp.bc -o output.cpp
>
>
>
> In the output.cpp, the GetElementPtrInst::Create() will be missing the Pointer type (1st param). The attached patch resolve the issue... or at least it attempts to do so.
>
>
>
> Also in Bugzilla as bug 24689.
>
>
>
> Thanks,
>
> Jerome
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150908/e8fd6032/attachment.html>


More information about the llvm-commits mailing list