From b92a77610d9c1efd707c633dfa80935f67b80a76 Mon Sep 17 00:00:00 2001 From: atimofee Date: Thu, 3 Mar 2016 19:36:52 +0300 Subject: [PATCH] Assert ("This function is used in places that assume strings use char") in stringLiteral::getString() FIXED [ROCm/clr commit: 7249e26c703ac69c79dff733acecea47d5d88338] --- projects/clr/hipamd/src/Cuda2Hip.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/Cuda2Hip.cpp b/projects/clr/hipamd/src/Cuda2Hip.cpp index 42d3ca836f..f27a1bc1e5 100644 --- a/projects/clr/hipamd/src/Cuda2Hip.cpp +++ b/projects/clr/hipamd/src/Cuda2Hip.cpp @@ -569,8 +569,10 @@ class Cuda2HipCallback : public MatchFinder::MatchCallback { if (const StringLiteral * stringLiteral = Result.Nodes.getNodeAs("stringLiteral")) { - StringRef s = stringLiteral->getString(); - processString(s, N, Replace, *SM, stringLiteral->getLocStart()); + if (stringLiteral->getCharByteWidth() == 1) { + StringRef s = stringLiteral->getString(); + processString(s, N, Replace, *SM, stringLiteral->getLocStart()); + } } if (const UnaryExprOrTypeTraitExpr * expr = Result.Nodes.getNodeAs("cudaStructSizeOf"))