Devang Patel
00afcbe366
Start using DIBuilder. It provides cleaner interface.
...
llvm-svn: 121302
2010-12-08 22:42:58 +00:00
Devang Patel
86f30f5a1d
Simplify. Builtin types' context is always implied.
...
llvm-svn: 117928
2010-11-01 16:52:40 +00:00
Devang Patel
ed23f18d7e
Basic types are language defined builtins. They are always defined at top most level.
...
llvm-svn: 117613
2010-10-28 22:03:20 +00:00
Devang Patel
67f70aaf5a
Fix debug info for anon union.
...
This is tested by anon-union.exp.
llvm-svn: 116372
2010-10-12 23:24:54 +00:00
John McCall
a2fabff4f6
Permit constant evaluation of const floating-point variables with
...
constant initializers.
llvm-svn: 116138
2010-10-09 01:34:31 +00:00
Devang Patel
5b389f495b
Remove unused argument.
...
llvm-svn: 115789
2010-10-06 15:58:57 +00:00
Devang Patel
91bbb5547d
Introduce -flimit-debug-info.
...
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
2010-09-30 19:05:55 +00:00
David Chisnall
cf60744cd7
Tidy up last commit, as per Devang's comments.
...
llvm-svn: 112840
2010-09-02 18:01:51 +00:00
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
41c2097058
Emit debug info for enum constants.
...
llvm-svn: 111852
2010-08-23 22:07:25 +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
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
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
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
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
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
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
Benjamin Kramer
20f2d4382f
Fix pasto, add a comment.
...
llvm-svn: 102263
2010-04-24 20:26:20 +00:00
Benjamin Kramer
bbb5deace6
Factor code. No functionality change.
...
llvm-svn: 102262
2010-04-24 20:19:58 +00:00
Anders Carlsson
11e5140db9
Vtable -> VTable renames across the board.
...
llvm-svn: 101666
2010-04-17 20:15:18 +00:00
Benjamin Kramer
9e2e1c9024
Minor include pruning.
...
llvm-svn: 100007
2010-03-31 15:04:05 +00:00
Ted Kremenek
dbb8cd1d34
Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
...
This reduces '-c -g' time on one file in 403.gcc by 12%.
llvm-svn: 99857
2010-03-30 00:27:51 +00:00
Ted Kremenek
ac031880af
Remove FIXME comment.
...
llvm-svn: 99828
2010-03-29 19:10:41 +00:00
Ted Kremenek
23c29f0cbe
Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen time
...
on one .i file from 403.gcc by 0.5%.
llvm-svn: 99823
2010-03-29 18:29:57 +00:00
Devang Patel
4f26205ba8
More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.
...
This fixes PR 6554.
llvm-svn: 98083
2010-03-09 21:32:27 +00:00
Devang Patel
408dcf60aa
Start using DIFile. Corresponding llvm patch is r98020.
...
llvm-svn: 98021
2010-03-09 00:44:50 +00:00
Devang Patel
b407338fe2
Emit debug info for VectorType.
...
llvm-svn: 96999
2010-02-23 22:59:39 +00:00
Devang Patel
535fdaf020
Refactor code that generates debug info for variables that has BlocksAttr.
...
llvm-svn: 95786
2010-02-10 18:49:08 +00:00
Devang Patel
973f2eb0cd
Emit debug info for namespaces.
...
llvm-svn: 94991
2010-02-01 19:16:32 +00:00
Devang Patel
92e2541599
Maintain a map of regions (lexical scopes) and use it to find context for a global variable.
...
llvm-svn: 94817
2010-01-29 18:11:03 +00:00
Devang Patel
7bfc596fcf
s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.
...
llvm-svn: 94760
2010-01-28 23:15:27 +00:00
Devang Patel
0d61eebd81
s/FunctionNames/DebugInfoNames/g
...
llvm-svn: 94753
2010-01-28 18:21:00 +00:00
Devang Patel
84033fb240
Emit vtable info.
...
llvm-svn: 94751
2010-01-28 18:11:52 +00:00
Devang Patel
3d4e6d9dd0
Include "this" pointer argument while emitting debug info for a C++ method.
...
llvm-svn: 94710
2010-01-28 00:28:01 +00:00
Anders Carlsson
17ed0496c5
Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.
...
llvm-svn: 94519
2010-01-26 05:19:50 +00:00
Anders Carlsson
b85f0ab976
Factor creating the DISubprogram for a member function out into a separate function.
...
llvm-svn: 94513
2010-01-26 04:49:33 +00:00
Devang Patel
c54353d935
First cut at emitting inheritance info.
...
llvm-svn: 94473
2010-01-25 23:32:18 +00:00
Devang Patel
7a12ad0dc1
First cut at emitting debugging information for C++ member functions.
...
There is lot more work to do in this area.
llvm-svn: 93836
2010-01-19 01:54:44 +00:00
Devang Patel
889ce76f41
Refactor.
...
llvm-svn: 93814
2010-01-19 00:00:59 +00:00
Devang Patel
934661ed73
Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
...
llvm-svn: 93383
2010-01-14 00:36:21 +00:00
Benjamin Kramer
ba8451b243
Use StringRef in CGDebugInfo::EmitFunctionStart.
...
llvm-svn: 90856
2009-12-08 14:04:35 +00:00
Anders Carlsson
3efc6e6f46
Add rudimentary support for member pointers to CGDebugInfo.
...
llvm-svn: 90711
2009-12-06 18:00:51 +00:00
Devang Patel
b40f295037
Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.
...
llvm-svn: 88677
2009-11-13 19:10:24 +00:00
Anders Carlsson
443f677302
Simplify the debug info code, handle lvalue references and template specializations.
...
llvm-svn: 86277
2009-11-06 19:19:55 +00:00
Mike Stump
ae2559a221
Fixup the return type of functions.
...
llvm-svn: 84922
2009-10-23 01:52:13 +00:00