1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/Support
Chandler Carruth 1895f07cd4 [Support] Add a fancy helper function to get a static name for a type.
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

llvm-svn: 261819
2016-02-25 03:58:21 +00:00
..
ELFRelocs [Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit 4-byte aligned relocation to be a valid instruction encoding. 2016-02-16 20:38:17 +00:00
AlignOf.h Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes. 2016-01-26 18:48:36 +00:00
Allocator.h BumpPtrAllocator::Reset should also poison the first slab which doesn't get deallocated. 2016-01-11 21:28:03 +00:00
ARMBuildAttributes.h [ARM] Add DSP build attribute and extension targeting 2016-01-25 11:26:11 +00:00
ARMEHABI.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ARMTargetParser.def [ARM] Add DSP build attribute and extension targeting 2016-01-25 11:26:11 +00:00
ARMWinEH.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ArrayRecycler.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Atomic.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
BlockFrequency.h Add - and -= operators to BlockFrequency using saturating arithmetic. 2015-10-12 18:34:00 +00:00
BranchProbability.h Minor code cleanups. NFC. 2016-02-15 04:30:37 +00:00
Capacity.h
Casting.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CBindingWrapping.h Reorganize the C API headers to improve build times. 2015-12-18 01:46:52 +00:00
circular_raw_ostream.h Reformat headers in ADT and Support partially. 2015-08-10 04:22:36 +00:00
CodeGen.h Support: Fix incremental build when re-configuring targets 2016-02-13 22:58:43 +00:00
CodeGenCWrappers.h Support: Fix incremental build when re-configuring targets 2016-02-13 22:58:43 +00:00
COFF.h Reland "[CodeView] Use assembler directives for line tables" 2016-01-29 00:49:42 +00:00
COM.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CommandLine.h StringRef-ify some Option APIs 2015-11-17 19:00:52 +00:00
Compiler.h Enable constexpr on Visual Studio 2015, add support for two equivalent attributes 2016-02-10 19:07:47 +00:00
Compression.h Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
ConvertUTF.h Add a UTF8 to UTF16 conversion wrapper for use in the pdb dumper 2015-01-26 19:51:00 +00:00
CrashRecoveryContext.h Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories; other minor cleanups. 2015-09-29 18:02:48 +00:00
DataExtractor.h Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
DataStream.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DataTypes.h.cmake Remove references to *.h.in files and some autoconf hackery 2016-01-30 04:15:33 +00:00
Debug.h docs: Stop using DEBUG() without DEBUG_TYPE in the ProgrammersManual 2015-10-15 18:17:44 +00:00
DOTGraphTraits.h Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
Dwarf.def DWARF RenderScript vendor extension 2016-02-01 10:39:24 +00:00
Dwarf.h Add support for the .debug_macro section of the forthcoming DWARF 5 spec. 2015-12-15 21:50:27 +00:00
DynamicLibrary.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ELF.h Reinstate the second part of a comment. NFC. 2016-01-19 23:39:28 +00:00
Endian.h [readobj] Expand CodeView dumping functionality 2016-01-13 19:32:35 +00:00
EndianStream.h Typo fix and simplification. 2016-01-22 19:58:18 +00:00
Errc.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Errno.h
ErrorHandling.h Reformat headers in ADT and Support partially. 2015-08-10 04:22:36 +00:00
ErrorOr.h Use std::forward to make ErrorOr<T> constructible from a value that has a user-defined conversion to T. No functionality change intended. 2016-02-09 04:47:58 +00:00
FileOutputBuffer.h Return ErrorOr from FileOutputBuffer::create. NFC. 2015-08-13 00:31:39 +00:00
FileSystem.h NFC: Update documentation for createUniqueFile() to explain that models without an absolute path will be created in the current directory. 2015-11-06 01:45:30 +00:00
FileUtilities.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Format.h [Support] Fix the examples and assertion for format_hex_no_prefix to take into account that there are no prefix characters to include in Width. 2016-02-08 01:02:55 +00:00
FormattedStream.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
GCOV.h Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used 2015-10-14 00:04:19 +00:00
GenericDomTree.h [DominatorTree] Remove unnecessary map population. NFC. 2016-01-07 19:21:29 +00:00
GenericDomTreeConstruction.h Reformat headers in ADT and Support partially. 2015-08-10 04:22:36 +00:00
GraphWriter.h Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
Host.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
JamCRC.h [MC] Add support for generating COFF CRCs 2015-09-01 21:23:58 +00:00
LEB128.h Fixup for r217830. Don't do left shifts on negative values 2014-09-17 18:23:07 +00:00
LICENSE.TXT
LineIterator.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Locale.h
LockFileManager.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
MachO.h ARM: support .watchos_version_min and .tvos_version_min. 2015-10-28 22:36:05 +00:00
ManagedStatic.h Support: Clean up TSan annotations. 2015-08-18 22:31:24 +00:00
MathExtras.h Delete dead code. 2016-01-18 21:01:50 +00:00
MD5.h Fix comment for MD5Hash. 2016-02-09 13:28:44 +00:00
Memory.h Add a sys::OwningMemoryBlock class, which is a sys::MemoryBlock that owns its 2015-10-31 00:55:32 +00:00
MemoryBuffer.h Reorganize the C API headers to improve build times. 2015-12-18 01:46:52 +00:00
MemoryObject.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MipsABIFlags.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Mutex.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MutexGuard.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
OnDiskHashTable.h [PGO] Add support for reading multiple versions of indexed profile format profile data 2015-12-01 20:26:26 +00:00
Options.h Fix some comment typos. 2015-08-08 18:27:36 +00:00
Path.h Moving FileManager::removeDotPaths to llvm::sys::path::remove_dots 2015-11-09 18:56:31 +00:00
PluginLoader.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PointerLikeTypeTraits.h Revert "Revert "[ptr-traits] Implement the base pointer traits using the actual"" 2015-12-30 23:37:25 +00:00
PrettyStackTrace.h Add functions to save and restore the PrettyStackTrace state. 2015-08-07 17:47:03 +00:00
Printable.h raw_ostream: << operator for callables with raw_ostream argument 2015-12-04 01:31:59 +00:00
Process.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Program.h Replace static const int with enum to fix obnoxious linker errors about a missing definition 2016-02-03 21:45:39 +00:00
RandomNumberGenerator.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
raw_os_ostream.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
raw_ostream.h Drop an unnecessary use of writev. 2015-12-16 22:59:06 +00:00
Recycler.h Support: Stop using iplist in Recycler 2015-10-07 20:49:09 +00:00
RecyclingAllocator.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Regex.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Registry.h Add support for importing and exporting Registry objects on Windows 2016-02-09 19:37:25 +00:00
RWMutex.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SaveAndRestore.h SaveAndRestore: fix coding style and Doxygenify comments 2014-04-10 09:44:32 +00:00
ScaledNumber.h Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-02 18:20:45 +00:00
Signals.h Rename RunCallBacksToRun to llvm::sys::RunSignalHandlers 2015-07-22 21:11:17 +00:00
SMLoc.h Whitespace. 2015-08-10 04:22:09 +00:00
Solaris.h
SourceMgr.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SpecialCaseList.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
StreamingMemoryObject.h Fix testing for end of stream in bitstream reader. 2015-08-03 18:01:50 +00:00
StringPool.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
StringSaver.h There is only one saver of strings. 2015-08-13 01:07:02 +00:00
SwapByteOrder.h Fix getSwappedBytes for double. 2015-05-19 08:44:15 +00:00
SystemUtils.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
TargetParser.h [ARM] Add ARMv8.2-A to TargetParser 2015-12-01 10:33:56 +00:00
TargetRegistry.h [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
TargetSelect.h Whitespace. 2015-08-10 04:22:09 +00:00
thread.h Add a C++11 ThreadPool implementation in LLVM 2015-12-15 00:59:19 +00:00
Threading.h Whitespace. 2015-08-10 04:22:09 +00:00
ThreadLocal.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ThreadPool.h Wrap include of <future> in some warning suppression pragmas 2015-12-15 22:10:30 +00:00
Timer.h [Support] Allow multiple paired calls to {start,stop}Timer() 2015-12-22 17:36:17 +00:00
TimeValue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ToolOutputFile.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
TrailingObjects.h Remove TrailingObjects::operator delete. It's still suffering from 2016-02-09 02:09:16 +00:00
type_traits.h Add a TrailingObjects template class. 2015-08-05 22:57:34 +00:00
TypeName.h [Support] Add a fancy helper function to get a static name for a type. 2016-02-25 03:58:21 +00:00
Unicode.h include/llvm/Support/Unicode.h didn't have re-include guards 2014-05-13 10:11:29 +00:00
UnicodeCharRanges.h [Support] Add comment to explain why we can't drop NDEBUG. 2015-10-24 22:15:32 +00:00
UniqueLock.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Valgrind.h Support: Clean up TSan annotations. 2015-08-18 22:31:24 +00:00
Watchdog.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Win64EH.h Support: Delete {aligned_,}{u,}{little,big}8_t 2014-09-11 21:46:33 +00:00
WindowsError.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
YAMLParser.h Add != to YAMLParser's basic_collection_iterator. 2016-01-06 05:17:12 +00:00
YAMLTraits.h Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories; other minor cleanups. 2015-09-29 18:02:48 +00:00