mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix VC++ compilation error
llvm-svn: 19124
This commit is contained in:
parent
1ba681007f
commit
916051a9fd
@ -23,6 +23,9 @@
|
||||
#include <fstream>
|
||||
#include <malloc.h>
|
||||
|
||||
// We need to undo a macro defined in Windows.h, otherwise we won't compile:
|
||||
#undef CopyFile
|
||||
|
||||
static void FlipBackSlashes(std::string& s) {
|
||||
for (size_t i = 0; i < s.size(); i++)
|
||||
if (s[i] == '\\')
|
||||
@ -574,7 +577,9 @@ bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
|
||||
|
||||
void
|
||||
sys::CopyFile(const sys::Path &Dest, const sys::Path &Src) {
|
||||
if (!::CopyFile(Src.c_str(), Dest.c_str(), false))
|
||||
// Can't use CopyFile macro defined in Windows.h because it would mess up the
|
||||
// above line. We use the expansion it would have in a non-UNICODE build.
|
||||
if (!::CopyFileA(Src.c_str(), Dest.c_str(), false))
|
||||
ThrowError("Can't copy '" + Src.toString() +
|
||||
"' to '" + Dest.toString() + "'");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user