clover/llvm: Clean up compile_native().
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 17 May 2016 14:02:49 +0000 (16:02 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 12 Jul 2016 03:22:50 +0000 (20:22 -0700)
commit3ce6ab068ced4341bbb404df12fb9bcca294e94c
tree6209f053c84025007202918c8067b5fd8a26f250
parent7bcefa59031992a39ac997c2000dbad26153aed2
clover/llvm: Clean up compile_native().

This switches compile_native() to the C++ API (which the rest of this
file makes use of anyway so there is little benefit from using the C
API), what should get rid of an amount of boilerplate and fix a leak
of the TargetMachine object in the error path.

v2: Additional fixes for LLVM 3.6.
v3: Update for the latest LLVM SVN changes.

Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/compat.hpp
src/gallium/state_trackers/clover/llvm/invocation.cpp
src/gallium/state_trackers/clover/llvm/util.hpp