aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/RewriteBlocks.cpp')
-rw-r--r--lib/Frontend/RewriteBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/RewriteBlocks.cpp b/lib/Frontend/RewriteBlocks.cpp
index a7b5e3d686..b7cdb48aab 100644
--- a/lib/Frontend/RewriteBlocks.cpp
+++ b/lib/Frontend/RewriteBlocks.cpp
@@ -236,7 +236,8 @@ void RewriteBlocks::InsertText(SourceLocation Loc, const char *StrData,
void RewriteBlocks::ReplaceText(SourceLocation Start, unsigned OrigLength,
const char *NewStr, unsigned NewLength) {
- if (!Rewrite.ReplaceText(Start, OrigLength, NewStr, NewLength))
+ if (!Rewrite.ReplaceText(Start, OrigLength,
+ llvm::StringRef(NewStr, NewLength)))
return;
Diags.Report(Context->getFullLoc(Start), RewriteFailedDiag);
}