From bce3de81624d9b3d114074d87cb6defc353bd2cb Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 30 Oct 2018 01:55:09 +0000 Subject: [PATCH] Handle the very confusing dual encoding of the symbol name. --- src/program_state.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/program_state.cpp b/src/program_state.cpp index 43ceedee7b..4cee70c8f2 100644 --- a/src/program_state.cpp +++ b/src/program_state.cpp @@ -398,11 +398,10 @@ void read_kernarg_metadata( if (dx == string::npos) break; static constexpr decltype(tmp.size()) name_sz{5}; - dx = tmp.find_first_not_of(' ', dx + name_sz); + dx = tmp.find_first_not_of(" '", dx + name_sz); - auto fn = tmp.substr(dx, tmp.find('\n', dx) - dx); + auto fn = tmp.substr(dx, tmp.find_first_of("'\n", dx) - dx); dx += fn.size(); - dx = tmp.find("Args:", dx); if (dx == string::npos) break; @@ -590,6 +589,7 @@ unordered_map>>& kernargs() { } }); + for (auto&& x : r) std::cerr << x.first << std::endl; return r; }