1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/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
..
AlignOfTest.cpp Fixed compilation issue. 2016-01-28 20:36:46 +00:00
AllocatorTest.cpp Fix "the the" in comments. 2015-06-19 01:53:21 +00:00
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp Add - and -= operators to BlockFrequency using saturating arithmetic. 2015-10-12 18:34:00 +00:00
BranchProbabilityTest.cpp BranchProbabilityTest.cpp: Suppress warnings. [-Wsign-compare] 2015-12-18 00:18:18 +00:00
Casting.cpp Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:00:20 +00:00
CMakeLists.txt [Support] Add a fancy helper function to get a static name for a type. 2016-02-25 03:58:21 +00:00
CommandLineTest.cpp StringRef-ify some Option APIs 2015-11-17 19:00:52 +00:00
CompressionTest.cpp
ConvertUTFTest.cpp Fix unsigned/signed comparison warning. 2015-01-27 01:01:39 +00:00
DataExtractorTest.cpp
DwarfTest.cpp Support: Add dwarf::getOperationEncoding() 2015-02-13 01:05:00 +00:00
EndianStreamTest.cpp Add a test showing we can write a vector of floats. 2016-01-25 19:02:20 +00:00
EndianTest.cpp Fix another UBSan test error from r248897 and follow on fix r249689 2015-10-08 20:52:23 +00:00
ErrorOrTest.cpp 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
FileOutputBufferTest.cpp Return ErrorOr from FileOutputBuffer::create. NFC. 2015-08-13 00:31:39 +00:00
formatted_raw_ostream_test.cpp
IteratorTest.cpp
LEB128Test.cpp
LineIteratorTest.cpp
LockFileManagerTest.cpp
ManagedStatic.cpp
MathExtrasTest.cpp Update to use new name alignTo(). 2016-01-14 21:06:47 +00:00
MD5Test.cpp
MemoryBufferTest.cpp Remove excess white space 2015-11-18 00:31:34 +00:00
MemoryTest.cpp
Path.cpp Fix a -Wsign-compare in Support Path unittests 2016-02-10 19:29:01 +00:00
ProcessTest.cpp
ProgramTest.cpp Silence -Wsign-conversion issue in ProgramTest.cpp 2016-02-03 21:41:12 +00:00
raw_ostream_test.cpp Silence some MSVC warnings about zero extending unsigned to void* 2016-02-10 19:11:15 +00:00
raw_pwrite_stream_test.cpp Disable failing TestDevNull test on Windows 2015-04-29 16:54:11 +00:00
RegexTest.cpp
ReplaceFileTest.cpp Fix rename() sometimes failing if another process uses openFileForRead() 2015-10-12 15:11:47 +00:00
ScaledNumberTest.cpp Fix infinite recursion in ScaledNumber::toInt. 2015-05-01 17:59:15 +00:00
SourceMgrTest.cpp
SpecialCaseListTest.cpp SpecialCaseList: Add support for parsing multiple input files. 2015-02-04 17:39:48 +00:00
StreamingMemoryObject.cpp Use std::unique_ptr to manage the DataStreamer in bitcode parsing. 2015-06-16 23:29:49 +00:00
StringPool.cpp
SwapByteOrderTest.cpp Unit tests for the getSwappedBytes(double) fix from r237673. 2015-05-20 14:57:43 +00:00
ThreadLocalTest.cpp
ThreadPool.cpp ThreadPool unittests: do not hold mutex when calling condition_variable:notify() 2015-12-19 22:56:24 +00:00
TimerTest.cpp Unbreak LLVM_ENABLE_THREADS=OFF builds. 2015-12-23 01:04:53 +00:00
TimeValueTest.cpp
TrailingObjectsTest.cpp Remove TrailingObjects::operator delete. It's still suffering from 2016-02-09 02:09:16 +00:00
TypeNameTest.cpp [Support] Add a fancy helper function to get a static name for a type. 2016-02-25 03:58:21 +00:00
UnicodeTest.cpp
YAMLIOTest.cpp Revert r239972 (YAML: Assign a value returned by the default constructor to the value in an optional mapping). 2015-06-17 23:48:06 +00:00
YAMLParserTest.cpp Add != to YAMLParser's basic_collection_iterator. 2016-01-06 05:17:12 +00:00