llvm-6502/unittests
Chandler Carruth 07c2241e45 [LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
resisted this for too long. Just with the basic testing here I was able
to exercise the analysis in more detail and sift out both type signature
bugs in the API and a bug in the DFS numbering. All of these are fixed
here as well.

The unittests will be much more important for the mutation support where
it is necessary to craft minimal mutations and then inspect the state of
the graph. There is just no way to do that with a standard FileCheck
test. However, unittesting these kinds of analyses is really quite easy,
especially as they're designed with the new pass manager where there is
essentially no infrastructure required to rig up the core logic and
exercise it at an API level.

As a minor aside about the DFS numbering bug, the DFS numbering used in
LCG is a bit unusual. Rather than numbering from 0, we number from 1,
and use 0 as the sentinel "unvisited" state. Other implementations often
use '-1' for this, but I find it easier to deal with 0 and it shouldn't
make any real difference provided someone doesn't write silly bugs like
forgetting to actually initialize the DFS numbering. Oops. ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206954 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23 08:08:49 +00:00
..
ADT Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
Analysis [LCG] Add a unittest for the LazyCallGraph. I had a weak moment and 2014-04-23 08:08:49 +00:00
Bitcode verify-di: Implement DebugInfoVerifier 2014-04-15 16:27:38 +00:00
CodeGen Add support for hashing attributes with DW_FORM_block. This required 2014-02-20 02:50:45 +00:00
DebugInfo [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
ExecutionEngine Changes in IntelJITEventListener - By Arch Robinson 2014-04-06 11:08:33 +00:00
IR Make the User::value_op_iterator a random access iterator. I had written 2014-04-17 09:07:50 +00:00
LineEditor Introduce line editor library. 2014-01-31 23:46:14 +00:00
Linker Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MC Fix MCDataAtom never calling remap when adding data. 2013-10-16 18:26:16 +00:00
Object Object: Don't double-escape empty hexdata 2014-03-20 06:28:52 +00:00
Option Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
Support [Allocator] Make BumpPtrAllocator movable and move assignable. 2014-04-16 10:48:27 +00:00
Transforms This reverts r206828 until David has time to figure out that is going on. 2014-04-22 02:17:11 +00:00
CMakeLists.txt Correctly set rpath for unittests. 2014-02-28 16:11:03 +00:00
Makefile Introduce line editor library. 2014-01-31 23:46:14 +00:00
Makefile.unittest With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00