Devang Patel
96b7f55a03
Debug info for friends!
...
Patch originally by Alexander Herz.
llvm-svn: 112275
2010-08-27 17:47:47 +00:00
Devang Patel
22e99c2bad
Fix enum size and align. Tested by setvar.exp in gdb testsuite.
...
llvm-svn: 111936
2010-08-24 18:14:06 +00:00
Daniel Dunbar
64c222a6bc
Debug Info: Put full Clang version into the debug info, to make it easier to
...
identify what version of the compiler was used to build something.
llvm-svn: 111927
2010-08-24 17:41:09 +00:00
Devang Patel
41c2097058
Emit debug info for enum constants.
...
llvm-svn: 111852
2010-08-23 22:07:25 +00:00
Dan Gohman
66427b1fcf
Reinstate the code for emitting an initial debug type for a struct,
...
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.
llvm-svn: 111842
2010-08-23 21:15:56 +00:00
Eli Friedman
04831926ec
Detabify.
...
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
Dan Gohman
25f9aaedc6
Delete an obsolete comment.
...
llvm-svn: 111711
2010-08-21 02:41:29 +00:00
Dan Gohman
b1aac3362c
CreateTemporaryType doesn't needs its Context argument.
...
llvm-svn: 111688
2010-08-20 22:39:57 +00:00
Dan Gohman
196f71006e
Introduce a new temporary MDNode concept. Temporary MDNodes are
...
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.
llvm-svn: 111682
2010-08-20 22:02:57 +00:00
Devang Patel
caa23f0708
Emit debug info for static const class member.
...
llvm-svn: 110885
2010-08-12 00:02:44 +00:00
Devang Patel
8166571a25
Simplify
...
llvm-svn: 110716
2010-08-10 20:16:57 +00:00
Devang Patel
76e3b53541
Do not use DIGlobalVariable to emit debugging information for enums.
...
llvm-svn: 110697
2010-08-10 18:27:15 +00:00
Devang Patel
dc866e119c
Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.
...
llvm-svn: 110694
2010-08-10 17:53:33 +00:00
Devang Patel
e03edfd3e7
Even if a constant's evaluated value is used, emit debug info for the constant variable.
...
llvm-svn: 110660
2010-08-10 07:24:25 +00:00
Devang Patel
c7f16ab3e3
Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.
...
llvm-svn: 109694
2010-07-28 23:23:29 +00:00
Devang Patel
a652fab052
construct debug info for "id" by hand.
...
Tested by mi1-var-obj.exp in gdb testsuite.
llvm-svn: 109571
2010-07-28 01:33:15 +00:00
Devang Patel
4f6e73b168
Always use current working directory for DW_AT_comp_dir.
...
llvm-svn: 109535
2010-07-27 20:49:59 +00:00
Devang Patel
6014edd117
Reapply 109303.
...
llvm-svn: 109507
2010-07-27 15:17:16 +00:00
Devang Patel
6005082354
Revert 109303.
...
llvm-svn: 109426
2010-07-26 18:49:27 +00:00
Devang Patel
268ad093a7
Untangle filename/dirname confusion. Store constructed strings on the side. Avoid use of Path.makeAbsolute().
...
DW_TAG_compile_unit uses two attributes DW_AT_name and DW_AT_comp_dir. Their expected values are:
$ clang foo.c -g
DW_AT_name - foo.c
DW_AT_comp_dir - `pwd`
$ clang one/two/foo.c -g
DW_AT_name - one/two/foo.c
DW_AT_comp_dir - `pwd`
$ clang /tmp/one/foo.c -g
DW_AT_name - /tmp/one/foo.c
DW_AT_comp_dir - empty
llvm-svn: 109303
2010-07-24 00:59:16 +00:00
Devang Patel
cb9fe9ec16
Revert r109263.
...
llvm-svn: 109284
2010-07-23 23:04:28 +00:00
Devang Patel
28f167699a
There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.
...
llvm-svn: 109263
2010-07-23 20:38:37 +00:00
Devang Patel
0884a60eb5
Keep track of artificial scopes introduced by line directives. For example,
...
#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"
This is tested by step-line.exp in gdb testsuite.
llvm-svn: 109189
2010-07-22 22:29:16 +00:00
Devang Patel
222f4be834
ObjCId is special "struct objc_object". Make this explicit in debug info.
...
This is tested by objc-rbreak.exp in gdb testsuite.
llvm-svn: 109050
2010-07-21 22:41:25 +00:00
Devang Patel
0043977f09
Remove unintended code that was checked in as part of r108916.
...
llvm-svn: 108951
2010-07-20 22:32:37 +00:00
Devang Patel
11a42a4655
Remove unused argument.
...
llvm-svn: 108946
2010-07-20 22:20:10 +00:00
Devang Patel
6c01820900
Print template argument names for template class.
...
llvm-svn: 108916
2010-07-20 20:24:18 +00:00
Stuart Hastings
7d7bc561bf
Correct line info for declarations/definitions. Radar 8063111.
...
llvm-svn: 108785
2010-07-19 23:56:31 +00:00
Devang Patel
8fd6499a97
Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.
...
llvm-svn: 108471
2010-07-15 23:09:46 +00:00
Devang Patel
b3026df9fa
Mark implementation generated methods as artificial.
...
Tested by namespace.exp and virtfunc.exp from gdb testsuite.
llvm-svn: 108468
2010-07-15 22:57:00 +00:00
Devang Patel
99c372134d
Revert 108220 and subsequent patch.
...
This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch.
llvm-svn: 108434
2010-07-15 18:16:09 +00:00
Devang Patel
01c8c100c2
Add volatile qualifiers for "this".
...
llvm-svn: 108245
2010-07-13 16:23:13 +00:00
Devang Patel
0a34e31d81
const qualify debug info for "this" for const methods.
...
llvm-svn: 108220
2010-07-13 00:24:30 +00:00
Devang Patel
0aabb1200f
While collecting members for a class, always create delcaration entry for methods. Debug info for method definition will be generated while generating code for method body.
...
Tested by classes.exp in gdb testsuite.
llvm-svn: 108205
2010-07-12 22:54:41 +00:00
Devang Patel
8f3f76f991
Handle forward declarations properly in debug info.
...
Patch by Alexander Kabaev.
PR 7595.
llvm-svn: 107900
2010-07-08 19:56:29 +00:00
Anders Carlsson
ea836bc41c
Switch over to the new caching version of getMangledName.
...
llvm-svn: 106549
2010-06-22 16:16:50 +00:00
Chandler Carruth
8509824cdb
Move CodeGenOptions.h *back* into Frontend. This should have been done when the
...
dependency edge was reversed such that CodeGen depends on Frontend.
llvm-svn: 106065
2010-06-15 23:19:56 +00:00
Devang Patel
6ccba0fb6e
Preserve type info for local variables in optimized builds.
...
llvm-gcc enabled this couple of weeks ago.
llvm-svn: 105516
2010-06-05 01:14:40 +00:00
John McCall
8b07ec253d
Substantially alter the design of the Objective C type AST by introducing
...
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870
2010-05-15 11:32:37 +00:00
Devang Patel
ec2a9abd4a
Fix thinko in yesterday's fix.
...
Providing linkage name for function static variable confuses gdb, so don't do that.
llvm-svn: 103779
2010-05-14 16:55:25 +00:00
Devang Patel
98f217118f
Fix context in class static variable's debugging information entry.
...
This fixes bunch of failures in gdb testsuite.
llvm-svn: 103745
2010-05-13 23:52:37 +00:00
Devang Patel
c5ffabc94f
If given location is invalid then use current location.
...
This fixes recent regressions reported by gdb testsuite.
Tighter verification of debug info generated by FE found these regressions.
Refactor code to extract line number and column number from SourceLocation.
llvm-svn: 103678
2010-05-12 23:46:38 +00:00
Abramo Bagnara
6150c884df
Merged Elaborated and QualifiedName types.
...
llvm-svn: 103517
2010-05-11 21:36:43 +00:00
Devang Patel
82bbfb58e3
Initialize Column.
...
llvm-svn: 103448
2010-05-10 23:48:38 +00:00
Devang Patel
b319adec49
If variable location is invalid then use current location.
...
This fixes radar 7959934.
llvm-svn: 103408
2010-05-10 17:24:58 +00:00
Devang Patel
67eba80672
If there is not any debug info for type then do not emit debug info for this variable.
...
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.
llvm-svn: 103320
2010-05-07 23:05:55 +00:00
Devang Patel
ba4ad7f2fd
Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103273
2010-05-07 18:12:35 +00:00
Douglas Gregor
c8be95274d
When instantiating a function that was declared via a typedef, e.g.,
...
typedef int functype(int, int);
functype func;
also instantiate the synthesized function parameters for the resulting
function declaration.
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025
2010-05-04 18:18:31 +00:00
Devang Patel
dfcd0661a1
Use clang::VarDecl name instead of llvm::GlobalVariable name.
...
llvm::GLobalVariable name may not match user visibile name for function static variables.
llvm-svn: 102644
2010-04-29 17:48:37 +00:00
John McCall
2408e32096
Make the InjectedClassNameType the canonical type of the current instantiation
...
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).
llvm-svn: 102407
2010-04-27 00:57:59 +00:00