28 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef TEST_SUPPORT_WIDE_TEMP_FILE_H10#define TEST_SUPPORT_WIDE_TEMP_FILE_H11 12#include <codecvt>13#include <locale>14#include <string>15 16#include "platform_support.h"17#include "test_macros.h"18 19TEST_DIAGNOSTIC_PUSH20TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")21TEST_GCC_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")22inline std::wstring get_wide_temp_file_name() {23 return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());24}25TEST_DIAGNOSTIC_POP26 27#endif // TEST_SUPPORT_WIDE_TEMP_FILE_H28