aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/clover/llvm/codegen/common.cpp3
-rw-r--r--src/gallium/state_trackers/clover/llvm/metadata.hpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
index 36e2adad0ab..730ba5a2ff7 100644
--- a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
+++ b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
@@ -196,8 +196,9 @@ clover::llvm::build_module_common(const Module &mod,
const clang::CompilerInstance &c) {
module m;
- for (const auto &name : map(std::mem_fn(&Function::getName),
+ for (const auto &llvm_name : map(std::mem_fn(&Function::getName),
get_kernels(mod))) {
+ const ::std::string name(llvm_name);
if (offsets.count(name))
m.syms.emplace_back(name, 0, offsets.at(name),
make_kernel_args(mod, name, c));
diff --git a/src/gallium/state_trackers/clover/llvm/metadata.hpp b/src/gallium/state_trackers/clover/llvm/metadata.hpp
index 5e8e720843d..58042f4b4da 100644
--- a/src/gallium/state_trackers/clover/llvm/metadata.hpp
+++ b/src/gallium/state_trackers/clover/llvm/metadata.hpp
@@ -62,7 +62,7 @@ namespace clover {
const std::string &name) {
return ::llvm::cast< ::llvm::MDString>(
detail::get_kernel_metadata_operands(f, name)[arg.getArgNo()])
- ->getString();
+ ->getString().str();
}
///