bool InsertTextBefore(SourceLocation Loc, const llvm::StringRef &Str) {
return InsertText(Loc, Str, false);
}
-
-
- bool InsertCStrBefore(SourceLocation Loc, const char* Str) {
- return InsertTextBefore(Loc, Str);
- }
-
-
- bool InsertCStrAfter(SourceLocation Loc, const char* Str) {
- return InsertTextAfter(Loc, Str);
- }
-
- bool InsertStrBefore(SourceLocation Loc, const std::string& Str) {
- return InsertTextBefore(Loc, Str);
- }
-
- bool InsertStrAfter(SourceLocation Loc, const std::string& Str) {
- return InsertTextAfter(Loc, Str);
- }
-
/// RemoveText - Remove the specified text region.
bool RemoveText(SourceLocation Start, unsigned Length);
const CodeModificationHint &Hint = Info.getCodeModificationHint(Idx);
if (!Hint.RemoveRange.isValid()) {
// We're adding code.
- if (Rewrite.InsertStrBefore(Hint.InsertionLoc, Hint.CodeToInsert))
+ if (Rewrite.InsertTextBefore(Hint.InsertionLoc, Hint.CodeToInsert))
Failed = true;
continue;
}
os << "</table>\n<!-- REPORTSUMMARYEXTRA -->\n"
"<h3>Annotated Source Code</h3>\n";
- R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str());
+ R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str());
}
// Embed meta-data tags.
os << "\n<!-- BUGMETAEND -->\n";
// Insert the text.
- R.InsertStrBefore(SMgr.getLocForStartOfFile(FID), os.str());
+ R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str());
}
// Add CSS, header, and footer.
SourceLocation Loc =
SM.getLocForStartOfFile(LPosInfo.first).getFileLocWithOffset(DisplayPos);
- R.InsertStrBefore(Loc, os.str());
+ R.InsertTextBefore(Loc, os.str());
// Now highlight the ranges.
for (const SourceRange *I = P.ranges_begin(), *E = P.ranges_end();
std::string EscapedCode = html::EscapeText(Hint->CodeToInsert, true);
EscapedCode = "<span class=\"CodeInsertionHint\">" + EscapedCode
+ "</span>";
- R.InsertStrBefore(Hint->InsertionLoc, EscapedCode);
+ R.InsertTextBefore(Hint->InsertionLoc, EscapedCode);
}
}
#endif
"</style>\n</head>\n<body>";
// Generate header
- R.InsertStrBefore(StartLoc, os.str());
+ R.InsertTextBefore(StartLoc, os.str());
// Generate footer
- R.InsertCStrAfter(EndLoc, "</body></html>\n");
+ R.InsertTextAfter(EndLoc, "</body></html>\n");
}
/// SyntaxHighlight - Relex the specified FileID and annotate the HTML with