mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
0e5b32301d
This extracts the type name from __PRETTY_FUNCTION__ for compilers that support it (I've opted Clang, GCC, and ICC into this as I've tested that they work) and from __FUNCSIG__ which is very similar on MSVC. The routine falls back gracefully on a stub "UNKNOWN_TYPE" string with compilers or formats it doesn't understand. This should be enough for a lot of common cases in LLVM where the real goal is just to log or print a type name as a debugging aid, and save a ton of boilerplate in the process. Notably, I'm planning to use this to remove all the getName() boiler plate from the new pass manager. The design and implementation is based on a bunch of advice and discussion with Richard Smith and experimenting with most versions of Clang and GCC. David Majnemer also provided excellent advice on how best to do this with MSVC. Richard also checked that ICC does something reasonable and I'll watch the build bots for other compilers. It'd be great if someone could contribute logic for xlC and/or other toolchains. Differential Revision: http://reviews.llvm.org/D17565 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261819 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
ADT | ||
Analysis | ||
AsmParser | ||
Bitcode | ||
CodeGen | ||
DebugInfo | ||
ExecutionEngine | ||
IR | ||
LineEditor | ||
Linker | ||
MC | ||
MI | ||
Option | ||
ProfileData | ||
Support | ||
Transforms | ||
CMakeLists.txt |