clover: Restore support for LLVM <= 3.9.
authorVedran Miletić <vedran@miletic.net>
Tue, 22 Nov 2016 19:25:34 +0000 (20:25 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 25 Nov 2016 00:40:29 +0000 (16:40 -0800)
commit95ddb37708ca16ccbd0f607d17a82be2de0d07b6
tree8b38ac144a26d55ea8b9ed871798ddbba87b54c8
parentf07da5aa5e2e6021f02104235429b670f6b468ec
clover: Restore support for LLVM <= 3.9.

The commit 8e430ff8b060b4e8e922bae24b3c57837da6ea77 broke support for
LLVM 3.9 and older versions in Clover. This patch restores it and
refactors the support using Clover compatibility layer for LLVM.

v2: merged #ifdef blocks
v3: added support for LLVM 3.6-3.8
v4: add missing #ifdef around <memory>
v5: simplify using templates and lambda

Signed-off-by: Vedran Miletić <vedran@miletic.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98740
Tested-by[v4]: Pierre Moreau <pierre.morrow@free.fr>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/codegen/bitcode.cpp
src/gallium/state_trackers/clover/llvm/compat.hpp