gallivm: abort when trying to use non-existing intrinsic
authorRoland Scheidegger <sroland@vmware.com>
Fri, 21 Dec 2018 01:41:31 +0000 (02:41 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 21 Dec 2018 16:37:00 +0000 (17:37 +0100)
commit171983dc89435d951ebfa42018546fb77d89d018
tree816bbbc596a78e37487b8ca01c2a36faecf2a89e
parentf3b1acff48492cf1b0dc0f5dab71ecc3f5806265
gallivm: abort when trying to use non-existing intrinsic

Whenever llvm removes an intrinsic (we're using), we're hitting segfaults
due to llvm doing calls to address 0 in the jitted code instead.
However, Jose figured out we can actually detect this with
LLVMGetIntrinsicID(), so use this to abort, so we don't have to wonder
what got broken. (Of course, someone still needs to fix the code to
no longer use this intrinsic.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_intr.c