diff options
author | Jan Vesely <[email protected]> | 2020-01-30 01:23:54 -0500 |
---|---|---|
committer | Jan Vesely <[email protected]> | 2020-02-03 21:25:59 +0000 |
commit | 0ccda2ebff83816cecf4dcb48f367a0d5c8f5fb1 (patch) | |
tree | 517d6fc8a41dd4286d29665b72243579efa08fed | |
parent | 5d83314945d5f286cbe4fff9b07d2756f36a64c6 (diff) |
clover: Use explicit conversion from llvm::StringRef to std::string
Fixes build after llvm 777180a32b61070a10dd330b4f038bf24e916af1
("[ADT] Make StringRef's std::string conversion operator explicit")
CC: <[email protected]>
Signed-off-by: Jan Vesely <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/clover/llvm/codegen/common.cpp | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/llvm/metadata.hpp | 2 |
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(); } /// |