forked from OSchip/llvm-project
[libc++][test] MSVC has no __PRETTY_FUNCTION__
Use `__FUNCSIG__` instead when compiling with MSVC. While we're touching `makeTypeIDImp`, remove the warning suppression for C4640 "construction of local static object is not thread safe" since C1XX now correctly constant-initializes `id`.
This commit is contained in:
parent
7f82352a2c
commit
a668ad92d5
libcxx/test/support
|
@ -42,18 +42,15 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// makeTypeID - Return the TypeID for the specified type 'T'.
|
// makeTypeID - Return the TypeID for the specified type 'T'.
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable: 4640) // '%s' construction of local static object is not thread safe (/Zc:threadSafeInit-)
|
|
||||||
#endif // _MSC_VER
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline TypeID const& makeTypeIDImp() {
|
inline TypeID const& makeTypeIDImp() {
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
static const TypeID id(__FUNCSIG__);
|
||||||
|
#else
|
||||||
static const TypeID id(__PRETTY_FUNCTION__);
|
static const TypeID id(__PRETTY_FUNCTION__);
|
||||||
|
#endif // _MSC_VER
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct TypeWrapper {};
|
struct TypeWrapper {};
|
||||||
|
|
Loading…
Reference in New Issue