Fix VC++ compilation errors
llvm-svn: 18953
diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp
index 1c2b00e6..dd0f275 100644
--- a/llvm/lib/System/Path.cpp
+++ b/llvm/lib/System/Path.cpp
@@ -26,8 +26,10 @@
Path
Path::GetLLVMConfigDir() {
Path result;
+#ifdef LLVM_ETCDIR
if (result.setDirectory(LLVM_ETCDIR))
return result;
+#endif
return GetLLVMDefaultConfigDir();
}
diff --git a/llvm/lib/System/Win32/Path.cpp b/llvm/lib/System/Win32/Path.cpp
index 149b4a1..24cfc46 100644
--- a/llvm/lib/System/Win32/Path.cpp
+++ b/llvm/lib/System/Win32/Path.cpp
@@ -180,11 +180,6 @@
}
Path
-Path::GetLLVMConfigDir() {
- return GetLLVMDefaultConfigDir();
-}
-
-Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
if (home) {
@@ -600,7 +595,7 @@
dir.elideFile();
std::string fname = this->getLast();
- char* newName = alloca(MAX_PATH+1);
+ char newName[MAX_PATH + 1];
if (!GetTempFileName(dir.c_str(), fname.c_str(), 0, newName))
ThrowError("Cannot make unique filename for '" + path + "'");