[libc] Add base for target config within cmake (#72318)
[llvm-project.git] / libcxx / test / support / wide_temp_file.h
blobf5a65408c7466922a433b59794363e677245b63c
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef TEST_SUPPORT_WIDE_TEMP_FILE_H
10 #define TEST_SUPPORT_WIDE_TEMP_FILE_H
12 #include <codecvt>
13 #include <locale>
14 #include <string>
16 #include "platform_support.h"
17 #include "test_macros.h"
19 TEST_DIAGNOSTIC_PUSH
20 TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
21 TEST_GCC_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
22 inline std::wstring get_wide_temp_file_name() {
23 return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());
25 TEST_DIAGNOSTIC_POP
27 #endif // TEST_SUPPORT_WIDE_TEMP_FILE_H