llvm-6502/lib
Bill Wendling a5c8a4e4e6 This is a large rewrite of how Dwarf info for inlined functions is handled.
The DwarfWriter expects DbgScopes and DIEs to behave themselves according to
DwarfWriter's rules. However, inlined functions violate these rules. There are
two different types of DIEs associated with an inlined function: an abstract
instance, which has information about the original source code for the function
being inlined; and concrete instances, which are created for each place the
function was inlined and point back to the abstract instance.

This patch tries to stay true to this schema. It bypasses how regular DbgScopes
and DIEs are created and used when necessary. It provides special handling for
DIEs of abstract and concrete instances.

This doesn't take care of all of the problems with debug info for inlined
functions, but it's a step in the right direction. For one thing, llvm-gcc
generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the
function's inlined) for this example:

#include <stdio.h>
static __inline__ __attribute__((always_inline))  int bar(int x) { return 4; }
void foo() {
  long long b = 1;
  int Y = bar(4);
  printf("%d\n", Y);
}

while clang generates correct IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-10 23:14:38 +00:00
..
Analysis Allow scalar evolution to compute iteration counts for loops with a 2009-05-09 12:32:42 +00:00
Archive
AsmParser Make MDNode use CallbackVH. Also change MDNode to store Value* instead of 2009-05-10 20:57:05 +00:00
Bitcode Make MDNode use CallbackVH. Also change MDNode to store Value* instead of 2009-05-10 20:57:05 +00:00
CodeGen This is a large rewrite of how Dwarf info for inlined functions is handled. 2009-05-10 23:14:38 +00:00
CompilerDriver -write-graph now can be used with -o. 2009-03-27 12:57:14 +00:00
Debugger
ExecutionEngine Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
Linker Add a new "available_externally" linkage type. This is intended 2009-04-13 05:44:34 +00:00
Support Move helper functions for optimizing division by constant into the APInt 2009-04-30 10:15:35 +00:00
System Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version. 2009-04-28 16:37:58 +00:00
Target Module iterator contains list of filescope functions as well, we don't need to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming. 2009-05-10 16:18:39 +00:00
Transforms Rename PaddedSize to AllocSize, in the hope that this 2009-05-09 07:06:46 +00:00
VMCore Make MDNode use CallbackVH. Also change MDNode to store Value* instead of 2009-05-10 20:57:05 +00:00
Makefile