Eli Bendersky
b42d1466a0
Fix PR12942: Allow two CUs to be generated from the same source file.
...
Thanks Eric for the review.
llvm-svn: 169142
2012-12-03 18:45:45 +00:00
Chandler Carruth
ed0881b2a6
Use the new script to sort the includes of every file under lib.
...
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.
Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]
llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Eric Christopher
92331fde8c
Whitespace.
...
llvm-svn: 168402
2012-11-21 00:34:38 +00:00
Eric Christopher
7b30f2e43b
Update for some of the coding standard before rearranging functions
...
around.
llvm-svn: 168401
2012-11-21 00:34:35 +00:00
Eric Christopher
0f23b82147
Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."
...
temporarily as it is breaking the gdb bots.
This reverts commit r167806/e7ff4c14b157746b3e0228d2dce9f70712d1c126.
llvm-svn: 167886
2012-11-13 23:30:43 +00:00
Bill Wendling
f454dfb6b5
Use the 'count' attribute instead of the 'upper_bound' attribute.
...
If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the
same for both of them because we use the 'upper_bound' attribute. Instead use
the 'count' attrbute, which gives the correct number of elements in the array.
<rdar://problem/12566646>
llvm-svn: 167806
2012-11-13 02:31:47 +00:00
Micah Villmow
cdfe20b97f
Move TargetData to DataLayout.
...
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Eric Christopher
3a3d529e0d
Only emit DW_AT_object_pointer if this is a definition.
...
llvm-svn: 164326
2012-09-20 22:51:57 +00:00
Eric Christopher
e341776c1e
Recommit, with fixes:
...
Add some support for dealing with an object pointer on arguments.
Part of rdar://9797999
which now supports adding the object pointer attribute to the
subprogram as it should.
llvm-svn: 163754
2012-09-12 23:36:19 +00:00
Eric Christopher
c44e973a36
Revert "Add some support for dealing with an object pointer on arguments."
...
This should be done on the subprogram, not the variable itself.
llvm-svn: 163734
2012-09-12 18:42:31 +00:00
Eric Christopher
97c0fdd116
Add some support for dealing with an object pointer on arguments.
...
Part of rdar://9797999
llvm-svn: 163667
2012-09-12 00:26:55 +00:00
Eric Christopher
a47d096125
No reason to construct this twice.
...
llvm-svn: 163567
2012-09-10 23:33:57 +00:00
Eric Christopher
bb69a27dbc
Use DW_FORM_flag_present to save space in debug information if we're
...
not in darwin gdb compat mode.
Fixes rdar://10975088
llvm-svn: 162526
2012-08-24 01:14:27 +00:00
Eric Christopher
acb7115bde
Remove the DW_AT_MIPS_linkage name attribute when we don't need it
...
output (we're emitting a specification already and the information
isn't changing) and we're not in old gdb compat mode.
Saves 1% on the debug information for a build of llvm.
Fixes rdar://11043421
llvm-svn: 162493
2012-08-23 22:52:55 +00:00
Eric Christopher
160522c25a
Grammar.
...
llvm-svn: 161851
2012-08-14 05:13:29 +00:00
Eric Christopher
ef9d710ea6
Reduce some code duplication.
...
llvm-svn: 159701
2012-07-04 02:02:18 +00:00
Bill Wendling
f799efdedc
The DIBuilder class is just a wrapper around debug info creation
...
(a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore
instead.
llvm-svn: 159414
2012-06-29 08:32:07 +00:00
Eric Christopher
1cf3338bb4
Add support for enum forward declarations.
...
Part of rdar://11570854
llvm-svn: 157786
2012-06-01 00:22:32 +00:00
Peter Collingbourne
4d358b55fa
Have getOrCreateSubprogramDIE store the DIE for a subprogram
...
definition in the map before calling itself to retrieve the
DIE for the declaration. Without this change, if this causes
getOrCreateSubprogramDIE to be recursively called on the definition,
it will create multiple DIEs for that definition. Fixes PR12831.
llvm-svn: 157541
2012-05-27 18:36:44 +00:00
Eric Christopher
c49643586b
Add support for C++11 enum classes in llvm.
...
Part of rdar://11496790
llvm-svn: 157303
2012-05-23 00:09:20 +00:00
Eric Christopher
d42b92f5c3
Untabify and 80-col.
...
llvm-svn: 157274
2012-05-22 18:45:24 +00:00
Eric Christopher
775cbd2b47
Formatting consistency.
...
llvm-svn: 157273
2012-05-22 18:45:18 +00:00
Eric Christopher
4d25052a9a
Handle OpDeref in case it comes in as a register operand.
...
Part of rdar://11352000
llvm-svn: 156405
2012-05-08 18:56:00 +00:00
Eric Christopher
a8caa739de
Make comment here more clear.
...
llvm-svn: 154878
2012-04-16 23:54:23 +00:00
Eric Christopher
70e1bd8872
Add support for objc property decls according to the page at:
...
http://llvm.org/docs/SourceLevelDebugging.html#objcproperty
including type and DECL. Expand the metadata needed accordingly.
rdar://11144023
llvm-svn: 153639
2012-03-29 08:42:56 +00:00
Eric Christopher
7285c7d51d
Fix the output of the DW_TAG_friend tag to include DW_AT_friend
...
and not the rest of the member tag.
Fixes PR11695
llvm-svn: 153570
2012-03-28 07:34:31 +00:00
Eric Christopher
7734ca2891
For types with a parent of the compile unit make sure and emit
...
the DECL information.
rdar://10855921
llvm-svn: 152876
2012-03-15 23:55:40 +00:00
Eric Christopher
7dd54fb695
Revert the removal of DW_AT_MIPS_linkage_name when we aren't putting
...
out the DW_AT_name. Older gdbs unfortunately still use it to
disambiguate member functions in templated classes (gdb.cp/templates.exp).
rdar://11043421 (which is now deferred for a bit)
llvm-svn: 152782
2012-03-15 08:19:33 +00:00
Eric Christopher
a9916d0296
Remove the DW_AT_MIPS_linkage name attribute when we don't need it
...
output (we're emitting a specification already and the information
isn't changing).
Saves 1% on the debug information for a build of llvm.
Fixes rdar://11043421
llvm-svn: 152697
2012-03-14 02:59:17 +00:00
Eric Christopher
54cf8ff45e
Add the DW_AT_APPLE_runtime_class attribute to forward declarations
...
as well as completely defined classes.
This fixes rdar://10956070
llvm-svn: 152171
2012-03-07 00:15:19 +00:00
Eric Christopher
5cd2a9d98e
Only add DW_AT_prototyped if we're working with a C-like language.
...
Worth another 45k (1%) off of a large C++ testcase.
rdar://10909458
llvm-svn: 151144
2012-02-22 08:46:21 +00:00
Eric Christopher
3a2656b394
Add the source language into the compile unit.
...
llvm-svn: 151143
2012-02-22 08:46:13 +00:00
Eric Christopher
ef64b465a4
Remove extra semi-colon.
...
llvm-svn: 151142
2012-02-22 08:46:02 +00:00
Eric Christopher
8575790912
There's no need for a DW_AT_byte_size on a pointer type.
...
Part of rdar://10493979 where it reduces by about .5% (10k)
llvm-svn: 151097
2012-02-21 22:25:53 +00:00
Devang Patel
d925d1a8d7
Remove tabs.
...
llvm-svn: 150012
2012-02-07 23:33:58 +00:00
Devang Patel
4488217f73
DebugInfo: Provide a new hook to encode relationship between a property and an ivar.
...
llvm-svn: 149874
2012-02-06 17:49:43 +00:00
Devang Patel
403e819731
Emit new property tag.
...
llvm-svn: 149737
2012-02-04 01:30:32 +00:00
Eric Christopher
8ea8e4fc76
Add a comment and ensure that anyone else looking at this code doesn't start
...
to bleed from the eyes.
llvm-svn: 147695
2012-01-06 23:03:37 +00:00
Eric Christopher
21bde87bf3
As part of the ongoing work in finalizing the accelerator tables, extend
...
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.
rdar://10652330
llvm-svn: 147651
2012-01-06 04:35:23 +00:00
Eric Christopher
da011dd0e3
Resolve part of a fixme and add a new one.
...
llvm-svn: 146784
2011-12-16 23:42:42 +00:00
Eric Christopher
03faed3eac
Add a fixme here.
...
llvm-svn: 146783
2011-12-16 23:42:38 +00:00
Nick Lewycky
cfde1a26b4
DW_AT_virtuality is also defined to be constant, not flag.
...
llvm-svn: 146534
2011-12-14 00:56:07 +00:00
Nick Lewycky
cb91849fc7
DW_AT_accessibility is "constant" class, not form class, so it may not use
...
DW_FORM_flag. Use DW_FORM_data1 for one byte.
llvm-svn: 146475
2011-12-13 05:09:11 +00:00
Devang Patel
107e8ec30d
DISubrange supports unsigned lower/upper array bounds, so let's not fake it in the end while emitting DWARF. If a FE needs to encode signed lower/upper array bounds then we need to extend DISubrange or ad DISignedSubrange.
...
llvm-svn: 144937
2011-11-17 23:43:15 +00:00
Eric Christopher
0a917b7ad4
Initialize variable.
...
llvm-svn: 144360
2011-11-11 03:16:32 +00:00
Eric Christopher
c12c211c44
If we have a DIE with an AT_specification use that instead of the normal
...
addr DIE when adding to the dwarf accelerator tables.
llvm-svn: 144354
2011-11-11 01:55:22 +00:00
Rafael Espindola
79278365d3
Check in getOrCreateSubprogramDIE if a declaration exists and if so output
...
it first.
This is a more general fix to pr11300.
llvm-svn: 144324
2011-11-10 22:34:29 +00:00
Eric Christopher
e288793e44
Move type handling to make sure we get all created types that aren't
...
forward decls and have names into the dwarf accelerator types table.
llvm-svn: 144306
2011-11-10 19:52:58 +00:00
Eric Christopher
5223a57533
Remove the pubnames section, no one consumes it.
...
llvm-svn: 144169
2011-11-09 05:24:07 +00:00
Eric Christopher
08a558eeef
Also add the linkage name to the name accelerator tables if it exists
...
and is different than the normal name.
llvm-svn: 144130
2011-11-08 21:56:23 +00:00