Add a new set of helper classes for creating and reading debug
authorChris Lattner <sabre@nondot.org>
Mon, 10 Nov 2008 02:56:27 +0000 (02:56 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Nov 2008 02:56:27 +0000 (02:56 +0000)
commita45664f7091d988d8ff3966a845bf672062e1e7a
tree7454843f95c73cb495d45399bca09d17a4998476
parent41bdedf17a512d47c060479f65ce996c54c93ffe
Add a new set of helper classes for creating and reading debug
information.  This logically replaces the "Desc" classes in
MachineModuleInfo.  Nice features of these classes are that they:

1. Are much more efficient than MMI because they don't create a
   temporary parallel data structure for debug info that has to be
   'serialized' and 'deserialized' into/out of the module.
2. These provide a much cleaner abstraction for debug info than
   MMI, which will make it easier to change the implementation in
   the future (to be MDNode-based).
3. These are much easier to use than the MMI interfaces, requiring
   a lot less code in the front-ends.
4. These can be used to both create (for frontends) and read (for
   codegen) debug information.  DebugInfoBuilder can only be used
   to create the nodes.

So far, this is implemented just enough to support the debug info
generation needs of clang.  This can and should be extended to
support the full set of debug info constructs, and we should switch
llvm-gcc and llc over to using this in the near future.

This code also has a ton of FIXMEs in it, because the way we
currently represent debug info in LLVM IR is basically insane in a
variety of details.  This sort of issue should be fixed when we
eventually reimplement debug info on top of MDNodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58954 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/DebugInfo.h [new file with mode: 0644]
lib/Analysis/DebugInfo.cpp [new file with mode: 0644]