Commit Graph

402 Commits

Author SHA1 Message Date
Devang Patel 420c8de92e Emit intrinsic at current insert point, not at the end of current block.
llvm-svn: 130177
2011-04-25 23:52:27 +00:00
Devang Patel 4f325d1f0f Simplify. There is no need to have a method to just call another method.
llvm-svn: 130175
2011-04-25 23:43:36 +00:00
Jay Foad dbf81d8ddf PR9214: Convert the DIBuilder API to use ArrayRef.
llvm-svn: 130086
2011-04-24 10:11:03 +00:00
Devang Patel a6cb0642b2 Tie debug information for method declaration with debug information for method definition.
llvm-svn: 130037
2011-04-23 00:08:01 +00:00
Ken Dyck bbe3862d95 Eliminate some literal 8s from EmitDeclare by converting to CharUnits. No
change in functionality intended.

llvm-svn: 129999
2011-04-22 17:41:34 +00:00
Ken Dyck 8159c1f2df Use CharUnits to eliminate some literal 8s in
EmitTypeForVarWithBlocksAttr(). No change in functionality intended.

llvm-svn: 129998
2011-04-22 17:34:18 +00:00
Devang Patel 43cfa5dce1 Fix typo in comment.
llvm-svn: 129703
2011-04-18 17:30:25 +00:00
Eli Friedman 2e2ff8894d Hack to turn the valgrind buildbot green, until Devang can address it
properly.

llvm-svn: 129657
2011-04-17 06:40:15 +00:00
Devang Patel 7294d74627 Emit proper selector name in debug info.
llvm-svn: 129626
2011-04-16 00:37:51 +00:00
Devang Patel 9d6c857862 Emit debug info for Objective-C properties.
llvm-svn: 129625
2011-04-16 00:12:55 +00:00
Nick Lewycky d85ae78c48 Apply explicit braces to avoid ambiguous 'else' [-Wparentheses]
llvm-svn: 129176
2011-04-09 00:25:15 +00:00
Devang Patel 0b37e79891 Do not use zero as an upper bound for unbounded array because upper bound zero also indicates one element array.
llvm-svn: 129157
2011-04-08 21:56:52 +00:00
Ken Dyck bb4e977218 [Reapply r128776, modified so that it does not break debug info.]
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.

llvm-svn: 129072
2011-04-07 12:37:09 +00:00
Devang Patel 78019ec14d Simplify.
llvm-svn: 128957
2011-04-05 23:26:36 +00:00
Devang Patel b87c428055 Emit debug info for function template parameters.
llvm-svn: 128948
2011-04-05 22:54:11 +00:00
Devang Patel e1dd424380 Remove unintentional check-in.
llvm-svn: 128928
2011-04-05 21:05:56 +00:00
Devang Patel 095421b4a8 Fix typo.
llvm-svn: 128921
2011-04-05 20:28:21 +00:00
Devang Patel 98d26c91da Use TemplateParameterList to extract template parameter name.
llvm-svn: 128915
2011-04-05 20:15:06 +00:00
Devang Patel 7522abd3ce Refactor.
llvm-svn: 128893
2011-04-05 17:30:54 +00:00
Devang Patel 44927690c3 Eliminate conservative check that is covered by isIncompleteType() check.
llvm-svn: 128857
2011-04-04 23:23:39 +00:00
Devang Patel a540f1462c Incomplete type does not have any size.
llvm-svn: 128855
2011-04-04 23:18:38 +00:00
Devang Patel 84852bbb42 Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.
llvm-svn: 128842
2011-04-04 20:36:06 +00:00
Ken Dyck 1473c9a7c4 Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.

llvm-svn: 128776
2011-04-02 17:52:22 +00:00
Devang Patel 1ffe23464a Do not try calculate the size of forward-declared template type array.
llvm-svn: 128725
2011-04-01 19:02:33 +00:00
Devang Patel 945b8aed2a Update type cache when a type is completed.
Radar 9168773

llvm-svn: 128150
2011-03-23 16:29:39 +00:00
Peter Collingbourne 599cb8e430 Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers.  Patch originally by ARM;
language-specific address space support by myself.

llvm-svn: 127915
2011-03-18 22:38:29 +00:00
Anders Carlsson 829c4134b8 Correctly unwrap 'auto' types. Fixes PR9414.
llvm-svn: 127121
2011-03-06 16:43:04 +00:00
John McCall 4223a9ee7a Make AttributedTypes for GC-qualified types and fix some miscellaneous
bugs with such types.  Not sure this is quite how I want the desugaring
and a.k.a. logic to go, but it suffices.

llvm-svn: 126986
2011-03-04 04:00:19 +00:00
Devang Patel 68a1525290 Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.

llvm-svn: 126960
2011-03-03 20:13:15 +00:00
Devang Patel bd6f7f9770 revert r126858.
llvm-svn: 126874
2011-03-02 20:31:22 +00:00
Devang Patel 31e5fb52d1 Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.

Reapply r126795 with a fix (one character change) for gdb testsuite regressions.

llvm-svn: 126858
2011-03-02 19:11:22 +00:00
Devang Patel a54696de8a Revert r126794.
llvm-svn: 126848
2011-03-02 17:54:58 +00:00
John McCall 81a325e038 Hack in something so that we emit better debug information about
captured __block variables in the block-literal type.

llvm-svn: 126834
2011-03-02 06:57:14 +00:00
Devang Patel 3bc2dedb40 Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.

llvm-svn: 126795
2011-03-01 22:59:40 +00:00
Devang Patel bbe4ff99e0 Use single code path to handle c++ structs and classes while generating debug info.
llvm-svn: 126691
2011-02-28 22:32:45 +00:00
John McCall 147d021b75 Emit the structure layout of the block literal parameter to a block
invocation function into the debug info.  Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.

Also, don't emit an unnecessarily parameter alloca for this "variable".

llvm-svn: 126255
2011-02-22 22:38:33 +00:00
Devang Patel d7185b755d Use LLVM coding standard.
llvm-svn: 126232
2011-02-22 18:56:36 +00:00
Richard Smith 30482bc786 Implement the C++0x deduced 'auto' feature.
This fixes PR 8738, 9060 and 9132.

llvm-svn: 126069
2011-02-20 03:19:35 +00:00
Devang Patel 2d6390d47b Start using enums from DIBuilder.
llvm-svn: 125990
2011-02-18 23:29:22 +00:00
Devang Patel 1728c232d5 If preprocessed token introduced empty filename then use main translation unit's filename for debug info entries.
llvm-svn: 125672
2011-02-16 18:40:36 +00:00
Devang Patel 25468059e5 Simplify test to check an aggregate argument that has non trivial constructor or destructor.
This patch rewrites r125142.

llvm-svn: 125632
2011-02-16 01:11:51 +00:00
Devang Patel 49e3348e56 Only c++ class arguments with non trivial constructor or destructor needs a reference.
C struct arguments do not need this adjustment.
This fixes 7 failures in callfuncs.exp from gdb testsuite.

llvm-svn: 125615
2011-02-15 23:36:28 +00:00
Devang Patel 425909dd41 If an aggregate is returned as 'sret' argument then let debugger know about this.
llvm-svn: 125249
2011-02-10 00:40:52 +00:00
Devang Patel 84d40a431f Do not emit AT_MIPS_linkage_name for Objective-C method static variable i.
llvm-svn: 125210
2011-02-09 19:16:38 +00:00
Devang Patel 19ba2b4d6e Emit debug info for objc_selector.
llvm-svn: 125163
2011-02-09 03:15:05 +00:00
Devang Patel 14524e0f24 If an aggregate argument is passed indirectly because it has non trivial
destructor or copy constructor than let debug info know about it.

Radar 8945514.

llvm-svn: 125142
2011-02-09 00:37:30 +00:00
John McCall ad7c5c1657 Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class.  Minor other refactorings.

Fixed a few address-space bugs while I was there.

llvm-svn: 125085
2011-02-08 08:22:06 +00:00
John McCall 351762cda2 A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls
  - BDREs no longer store copy expressions
  - BlockDecls now store a list of captured variables, information about
    how they're captured, and a copy expression if necessary
    
With that in hand, change IR generation to use the captures data in       
blocks instead of walking the block independently.        

Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.

llvm-svn: 125005
2011-02-07 10:33:21 +00:00
Devang Patel 84ffdd9ba3 Emit debug info for template value parameters.
llvm-svn: 124756
2011-02-02 22:36:18 +00:00
Devang Patel e3773c2f51 Emit debug info for template type parameters.
llvm-svn: 124753
2011-02-02 21:38:49 +00:00