[cfe-commits] r143550 - /cfe/trunk/lib/AST/StmtProfile.cpp

Douglas Gregor dgregor at apple.com
Wed Nov 2 10:26:05 PDT 2011


Author: dgregor
Date: Wed Nov  2 12:26:05 2011
New Revision: 143550

URL: http://llvm.org/viewvc/llvm-project?rev=143550&view=rev
Log:
Use StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the expression, so that it works for non-UTF8 strings.

Modified:
    cfe/trunk/lib/AST/StmtProfile.cpp

Modified: cfe/trunk/lib/AST/StmtProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtProfile.cpp?rev=143550&r1=143549&r2=143550&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtProfile.cpp (original)
+++ cfe/trunk/lib/AST/StmtProfile.cpp Wed Nov  2 12:26:05 2011
@@ -275,7 +275,7 @@
 
 void StmtProfiler::VisitStringLiteral(const StringLiteral *S) {
   VisitExpr(S);
-  ID.AddString(S->getString());
+  ID.AddString(S->getBytes());
   ID.AddInteger(S->getKind());
 }
 





More information about the cfe-commits mailing list