summaryrefslogtreecommitdiff
path: root/lib/System
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2004-12-15 04:08:15 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2004-12-15 04:08:15 +0000
commitab68df02bc29045b9f02783518fbc7d0f23f56b7 (patch)
tree05f8435d3fa90d478337e8fd1915c39f0213dc6f /lib/System
parent6af3d265261e24792b642cd476438cb072b19bbf (diff)
downloadllvm-ab68df02bc29045b9f02783518fbc7d0f23f56b7.tar.gz
llvm-ab68df02bc29045b9f02783518fbc7d0f23f56b7.tar.bz2
llvm-ab68df02bc29045b9f02783518fbc7d0f23f56b7.tar.xz
Fix VC++ compilation errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Path.cpp2
-rw-r--r--lib/System/Win32/Path.cpp7
-rw-r--r--lib/System/Win32/Path.inc7
3 files changed, 4 insertions, 12 deletions
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp
index 1c2b00e645..dd0f275d7d 100644
--- a/lib/System/Path.cpp
+++ b/lib/System/Path.cpp
@@ -26,8 +26,10 @@ using namespace sys;
Path
Path::GetLLVMConfigDir() {
Path result;
+#ifdef LLVM_ETCDIR
if (result.setDirectory(LLVM_ETCDIR))
return result;
+#endif
return GetLLVMDefaultConfigDir();
}
diff --git a/lib/System/Win32/Path.cpp b/lib/System/Win32/Path.cpp
index 149b4a1295..24cfc46518 100644
--- a/lib/System/Win32/Path.cpp
+++ b/lib/System/Win32/Path.cpp
@@ -180,11 +180,6 @@ Path::GetLLVMDefaultConfigDir() {
}
Path
-Path::GetLLVMConfigDir() {
- return GetLLVMDefaultConfigDir();
-}
-
-Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
if (home) {
@@ -600,7 +595,7 @@ Path::makeUnique() {
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 + "'");
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index 149b4a1295..24cfc46518 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -180,11 +180,6 @@ Path::GetLLVMDefaultConfigDir() {
}
Path
-Path::GetLLVMConfigDir() {
- return GetLLVMDefaultConfigDir();
-}
-
-Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
if (home) {
@@ -600,7 +595,7 @@ Path::makeUnique() {
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 + "'");