From: Douglas Gregor Date: Wed, 2 Nov 2011 17:26:05 +0000 (+0000) Subject: Use StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38738fcace68630bbbfe174c6a3698a4c94b3dc9;p=clang Use StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the expression, so that it works for non-UTF8 strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143550 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp index 93b2f65818..db97e59804 100644 --- a/lib/AST/StmtProfile.cpp +++ b/lib/AST/StmtProfile.cpp @@ -275,7 +275,7 @@ void StmtProfiler::VisitImaginaryLiteral(const ImaginaryLiteral *S) { void StmtProfiler::VisitStringLiteral(const StringLiteral *S) { VisitExpr(S); - ID.AddString(S->getString()); + ID.AddString(S->getBytes()); ID.AddInteger(S->getKind()); }