Path
Path::GetLLVMConfigDir() {
Path result;
+#ifdef LLVM_ETCDIR
if (result.setDirectory(LLVM_ETCDIR))
return result;
+#endif
return GetLLVMDefaultConfigDir();
}
return Path("/etc/llvm/");
}
-Path
-Path::GetLLVMConfigDir() {
- return GetLLVMDefaultConfigDir();
-}
-
Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
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 + "'");
return Path("/etc/llvm/");
}
-Path
-Path::GetLLVMConfigDir() {
- return GetLLVMDefaultConfigDir();
-}
-
Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
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 + "'");