summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtProfile.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-02 17:26:05 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-02 17:26:05 +0000
commit9d0eb8f9296df7f68cae05f7886fa5a73cde2574 (patch)
tree351eb0176154190ced0d757ffe805e782844e898 /clang/lib/AST/StmtProfile.cpp
parent4e8b46388368b96da624ba9df257e688d068cd7d (diff)
downloadbcm5719-llvm-9d0eb8f9296df7f68cae05f7886fa5a73cde2574.tar.gz
bcm5719-llvm-9d0eb8f9296df7f68cae05f7886fa5a73cde2574.zip
Use StringLiteral::getBytes(), not StringLiteral::getString(), when profiling the expression, so that it works for non-UTF8 strings.
llvm-svn: 143550
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r--clang/lib/AST/StmtProfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp
index 93b2f658183..db97e59804e 100644
--- a/clang/lib/AST/StmtProfile.cpp
+++ b/clang/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());
}
OpenPOWER on IntegriCloud