Fix clang-tools-extra build after r283815 (Store FileEntry::Filename as a StringRef instead of raw pointer)

llvm-svn: 283819
This commit is contained in:
Mehdi Amini 2016-10-10 23:24:16 +00:00
parent 47cbb566f4
commit 7ba59edbfb
2 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ bool writeFiles(const clang::Rewriter &Rewrites) {
for (Rewriter::const_buffer_iterator BufferI = Rewrites.buffer_begin(),
BufferE = Rewrites.buffer_end();
BufferI != BufferE; ++BufferI) {
const char *FileName =
StringRef FileName =
Rewrites.getSourceMgr().getFileEntryForID(BufferI->first)->getName();
std::error_code EC;

View File

@ -248,7 +248,7 @@ int main(int argc, char **argv) {
continue;
std::string NewFileData;
const char *FileName = FileAndReplacements.first->getName();
StringRef FileName = FileAndReplacements.first->getName();
if (!applyReplacements(FileAndReplacements.second, NewFileData,
Diagnostics)) {
errs() << "Failed to apply replacements to " << FileName << "\n";