aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/llvm/invocation.cpp
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-06-27 23:46:26 -0700
committerFrancisco Jerez <[email protected]>2016-07-11 20:22:56 -0700
commit0601fe74389b23ae1094e730a5681aed3af84629 (patch)
treecc1ce02a68449fbd0055a4e2b6d210b9effa108e /src/gallium/state_trackers/clover/llvm/invocation.cpp
parentf98422eafdd9f37f293970f908a87b81351b5ed4 (diff)
clover/llvm: Fold compile_native() call into build_module_native().
Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm/invocation.cpp')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp10
1 files 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<char> &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<char> 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;