Linux-Sparse Archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	linux-sparse@vger.kernel.org
Subject: Compile errors with LLVM v17
Date: Mon, 15 Jan 2024 13:32:05 +0300	[thread overview]
Message-ID: <91bbfbf8-d84d-4b4e-861d-c1cdbfcd56e6@moroto.mountain> (raw)

I upgraded my Debian system and started getting compile errors with LLVM
version 17.  Apparently those APIs will need to be changed.
https://llvm.org/docs/OpaquePointers.html

regards,
dan carpenter

sparse-llvm.c: In function ‘get_sym_value’:
sparse-llvm.c:305:34: warning: implicit declaration of function ‘LLVMConstGEP’; did you mean ‘LLVMConstGEP2’? [-Wimplicit-function-declaration]
  305 |                         result = LLVMConstGEP(data, indices, ARRAY_SIZE(indices));
      |                                  ^~~~~~~~~~~~
      |                                  LLVMConstGEP2
sparse-llvm.c:305:32: warning: assignment to ‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  305 |                         result = LLVMConstGEP(data, indices, ARRAY_SIZE(indices));
      |                                ^
sparse-llvm.c: In function ‘calc_gep’:
sparse-llvm.c:488:16: warning: implicit declaration of function ‘LLVMBuildInBoundsGEP’; did you mean ‘LLVMBuildInBoundsGEP2’? [-Wimplicit-function-declaration]
  488 |         addr = LLVMBuildInBoundsGEP(builder, base, &off, 1, name);
      |                ^~~~~~~~~~~~~~~~~~~~
      |                LLVMBuildInBoundsGEP2
sparse-llvm.c:488:14: warning: assignment to ‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  488 |         addr = LLVMBuildInBoundsGEP(builder, base, &off, 1, name);
      |              ^
sparse-llvm.c: In function ‘output_op_load’:
sparse-llvm.c:714:18: warning: implicit declaration of function ‘LLVMBuildLoad’; did you mean ‘LLVMBuildLoad2’? [-Wimplicit-function-declaration]
  714 |         target = LLVMBuildLoad(fn->builder, addr, name);
      |                  ^~~~~~~~~~~~~
      |                  LLVMBuildLoad2
sparse-llvm.c:714:16: warning: assignment to ‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  714 |         target = LLVMBuildLoad(fn->builder, addr, name);
      |                ^
sparse-llvm.c: In function ‘output_op_call’:
sparse-llvm.c:822:18: warning: implicit declaration of function ‘LLVMBuildCall’; did you mean ‘LLVMBuildCall2’? [-Wimplicit-function-declaration]
  822 |         target = LLVMBuildCall(fn->builder, func, args, n_arg, name);
      |                  ^~~~~~~~~~~~~
      |                  LLVMBuildCall2
sparse-llvm.c:822:16: warning: assignment to ‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  822 |         target = LLVMBuildCall(fn->builder, func, args, n_arg, name);
      |                ^


             reply	other threads:[~2024-01-15 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 10:32 Dan Carpenter [this message]
2024-01-16  0:50 ` Compile errors with LLVM v17 Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91bbfbf8-d84d-4b4e-861d-c1cdbfcd56e6@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).