diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-23 15:16:03 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-23 15:16:03 +0000 |
| commit | 37b012df8f192e21d62eaf7614e9df3fc8d09877 (patch) | |
| tree | d0ac9499f105bc8410e6df60f3b4f74fe76705d1 /llvm/lib/Support/Windows | |
| parent | 38c36ea18e3cae87e3d44fe643129320a6f1d539 (diff) | |
| download | bcm5719-llvm-37b012df8f192e21d62eaf7614e9df3fc8d09877.tar.gz bcm5719-llvm-37b012df8f192e21d62eaf7614e9df3fc8d09877.zip | |
Use static instead of an anonymous namespace.
llvm-svn: 201983
Diffstat (limited to 'llvm/lib/Support/Windows')
| -rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index f3c7ba1a24d..2e33c129e31 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -44,31 +44,29 @@ using namespace llvm; using llvm::sys::windows::UTF8ToUTF16; using llvm::sys::windows::UTF16ToUTF8; -namespace { - error_code TempDir(SmallVectorImpl<wchar_t> &result) { - retry_temp_dir: - DWORD len = ::GetTempPathW(result.capacity(), result.begin()); +static error_code TempDir(SmallVectorImpl<wchar_t> &result) { +retry_temp_dir: + DWORD len = ::GetTempPathW(result.capacity(), result.begin()); - if (len == 0) - return windows_error(::GetLastError()); - - if (len > result.capacity()) { - result.reserve(len); - goto retry_temp_dir; - } + if (len == 0) + return windows_error(::GetLastError()); - result.set_size(len); - return error_code::success(); + if (len > result.capacity()) { + result.reserve(len); + goto retry_temp_dir; } - bool is_separator(const wchar_t value) { - switch (value) { - case L'\\': - case L'/': - return true; - default: - return false; - } + result.set_size(len); + return error_code::success(); +} + +static bool is_separator(const wchar_t value) { + switch (value) { + case L'\\': + case L'/': + return true; + default: + return false; } } |

