mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Revert "r372201: [Support] Replace function with function_ref in writeFileAtomically. NFC"
function_ref causes calls to the function to be ambiguous, breaking compilation. Reverting for now. llvm-svn: 372202
This commit is contained in:
parent
5e10e7bc8c
commit
93a7fe8d08
@ -14,7 +14,6 @@
|
|||||||
#ifndef LLVM_SUPPORT_FILEUTILITIES_H
|
#ifndef LLVM_SUPPORT_FILEUTILITIES_H
|
||||||
#define LLVM_SUPPORT_FILEUTILITIES_H
|
#define LLVM_SUPPORT_FILEUTILITIES_H
|
||||||
|
|
||||||
#include "llvm/ADT/STLExtras.h"
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/Support/Errc.h"
|
#include "llvm/Support/Errc.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -108,9 +107,9 @@ namespace llvm {
|
|||||||
llvm::Error writeFileAtomically(StringRef TempPathModel, StringRef FinalPath,
|
llvm::Error writeFileAtomically(StringRef TempPathModel, StringRef FinalPath,
|
||||||
StringRef Buffer);
|
StringRef Buffer);
|
||||||
|
|
||||||
llvm::Error writeFileAtomically(
|
llvm::Error
|
||||||
StringRef TempPathModel, StringRef FinalPath,
|
writeFileAtomically(StringRef TempPathModel, StringRef FinalPath,
|
||||||
llvm::function_ref<llvm::Error(llvm::raw_ostream &)> Writer);
|
std::function<llvm::Error(llvm::raw_ostream &)> Writer);
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -296,7 +296,7 @@ llvm::Error llvm::writeFileAtomically(StringRef TempPathModel,
|
|||||||
|
|
||||||
llvm::Error llvm::writeFileAtomically(
|
llvm::Error llvm::writeFileAtomically(
|
||||||
StringRef TempPathModel, StringRef FinalPath,
|
StringRef TempPathModel, StringRef FinalPath,
|
||||||
llvm::function_ref<llvm::Error(llvm::raw_ostream &)> Writer) {
|
std::function<llvm::Error(llvm::raw_ostream &)> Writer) {
|
||||||
SmallString<128> GeneratedUniqPath;
|
SmallString<128> GeneratedUniqPath;
|
||||||
int TempFD;
|
int TempFD;
|
||||||
if (sys::fs::createUniqueFile(TempPathModel.str(), TempFD,
|
if (sys::fs::createUniqueFile(TempPathModel.str(), TempFD,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user