diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index d661c5cbc03..04efdced32a 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -14,7 +14,6 @@ #ifndef LLVM_SUPPORT_FILEUTILITIES_H #define LLVM_SUPPORT_FILEUTILITIES_H -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Errc.h" #include "llvm/Support/ErrorHandling.h" @@ -108,9 +107,9 @@ namespace llvm { llvm::Error writeFileAtomically(StringRef TempPathModel, StringRef FinalPath, StringRef Buffer); - llvm::Error writeFileAtomically( - StringRef TempPathModel, StringRef FinalPath, - llvm::function_ref Writer); + llvm::Error + writeFileAtomically(StringRef TempPathModel, StringRef FinalPath, + std::function Writer); } // End llvm namespace #endif diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp index 3d862f5f09e..d11fbb54dc0 100644 --- a/lib/Support/FileUtilities.cpp +++ b/lib/Support/FileUtilities.cpp @@ -296,7 +296,7 @@ llvm::Error llvm::writeFileAtomically(StringRef TempPathModel, llvm::Error llvm::writeFileAtomically( StringRef TempPathModel, StringRef FinalPath, - llvm::function_ref Writer) { + std::function Writer) { SmallString<128> GeneratedUniqPath; int TempFD; if (sys::fs::createUniqueFile(TempPathModel.str(), TempFD,