From 0601fe74389b23ae1094e730a5681aed3af84629 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 27 Jun 2016 23:46:26 -0700 Subject: clover/llvm: Fold compile_native() call into build_module_native(). Reviewed-by: Serge Martin Tested-by: Jan Vesely --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 242c096107f..754e477bd29 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -673,10 +673,10 @@ namespace { } module - build_module_native(std::vector &code, - llvm::Module *mod, + build_module_native(llvm::Module *mod, const target &target, const clang::CompilerInstance &c, std::string &r_log) { + const auto code = compile_native(mod, target, r_log); return build_module_common(*mod, code, get_symbol_offsets(code, r_log), c); } @@ -721,11 +721,9 @@ clover::compile_program_llvm(const std::string &source, case PIPE_SHADER_IR_LLVM: m = build_module_llvm(&*mod, *c); break; - case PIPE_SHADER_IR_NATIVE: { - std::vector code = compile_native(&*mod, target, r_log); - m = build_module_native(code, &*mod, *c, r_log); + case PIPE_SHADER_IR_NATIVE: + m = build_module_native(&*mod, target, *c, r_log); break; - } } return m; -- cgit v1.2.3