Author: mehdi_amini
Date: Mon Oct 10 18:24:16 2016
New Revision: 283819

URL: http://llvm.org/viewvc/llvm-project?rev=283819&view=rev
Log:
Fix clang-tools-extra build after r283815 (Store FileEntry::Filename as a 
StringRef instead of raw pointer)

Modified:
    
clang-tools-extra/trunk/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
    
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp

Modified: 
clang-tools-extra/trunk/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp?rev=283819&r1=283818&r2=283819&view=diff
==============================================================================
--- 
clang-tools-extra/trunk/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
 (original)
+++ 
clang-tools-extra/trunk/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
 Mon Oct 10 18:24:16 2016
@@ -300,7 +300,7 @@ bool writeFiles(const clang::Rewriter &R
   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;

Modified: 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=283819&r1=283818&r2=283819&view=diff
==============================================================================
--- 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 (original)
+++ 
clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
 Mon Oct 10 18:24:16 2016
@@ -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";


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to