aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Path.cpp')
-rw-r--r--lib/Support/Path.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp
index 5b73631..b8d676f 100644
--- a/lib/Support/Path.cpp
+++ b/lib/Support/Path.cpp
@@ -569,6 +569,12 @@ bool is_separator(char value) {
}
}
+static const char preferred_separator_string[] = { preferred_separator, '\0' };
+
+const StringRef get_separator() {
+ return preferred_separator_string;
+}
+
void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result) {
result.clear();
@@ -577,7 +583,7 @@ void system_temp_directory(bool erasedOnReboot, SmallVectorImpl<char> &result) {
// macros defined in <unistd.h> on darwin >= 9
int ConfName = erasedOnReboot? _CS_DARWIN_USER_TEMP_DIR
: _CS_DARWIN_USER_CACHE_DIR;
- size_t ConfLen = confstr(ConfName, 0, 0);
+ size_t ConfLen = confstr(ConfName, nullptr, 0);
if (ConfLen > 0) {
do {
result.resize(ConfLen);