Eric Christopher
47300ad6e4
Fix typo.
...
llvm-svn: 139668
2011-09-13 23:45:09 +00:00
Devang Patel
b0fa5b57ac
By popular demand, enumerate all builtin types!
...
llvm-svn: 139521
2011-09-12 18:50:21 +00:00
Devang Patel
33e097b699
Add an assert so that new builtins do not sneak without proper debug info.
...
llvm-svn: 139514
2011-09-12 18:24:46 +00:00
Devang Patel
98ca8aeca6
Fix debug info encodings for char16_t and char32_t.
...
llvm-svn: 139502
2011-09-12 17:11:58 +00:00
Devang Patel
964d758d17
Emit debug info for wchar_t.
...
llvm-svn: 139443
2011-09-10 00:44:49 +00:00
Douglas Gregor
e8bbc12152
Extend the ASTContext constructor to delay the initialization of
...
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
2011-09-02 00:18:52 +00:00
Nick Lewycky
0112b11f5c
Don't try to emit unsupported templated friend declarations. They're unsupported
...
and may very well be dependent-types, triggering an assertion in debug info
codegen.
llvm-svn: 138970
2011-09-01 21:49:51 +00:00
Chandler Carruth
35f5320d8e
Mechanically rename SourceManager::getInstantiationLoc and
...
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
llvm-svn: 135914
2011-07-25 16:49:02 +00:00
Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Devang Patel
206f5093e3
Simplify.
...
llvm-svn: 135456
2011-07-19 00:52:18 +00:00
Devang Patel
11de9a966a
Check column number also.
...
llvm-svn: 135437
2011-07-18 22:18:04 +00:00
Chris Lattner
2192fe50da
de-constify llvm::Type, patch by David Blaikie!
...
llvm-svn: 135370
2011-07-18 04:24:23 +00:00
Devang Patel
f0335ce632
Emit debug info for extended vectors.
...
llvm-svn: 135083
2011-07-13 21:23:30 +00:00
Devang Patel
15013e78c3
Fix struct member's scope. Patch by Xi Wang.
...
llvm-svn: 133829
2011-06-24 22:00:59 +00:00
John McCall
31168b077c
Automatic Reference Counting.
...
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
2011-06-15 23:02:42 +00:00
Devang Patel
f1e2a7f0f0
Simplify.
...
llvm-svn: 132560
2011-06-03 17:23:47 +00:00
Devang Patel
597a730cb8
Fix typedef's context.
...
llvm-svn: 132557
2011-06-03 17:05:26 +00:00
Devang Patel
5c71c2154b
Robustify objc method type description (subroutine type) by walking parameters directly.
...
llvm-svn: 132368
2011-05-31 22:21:11 +00:00
Devang Patel
7ce99c3637
List objective-c ineterfaces as public types in dwarf debug info output.
...
llvm-svn: 132361
2011-05-31 21:18:50 +00:00
Devang Patel
2780e4545a
List c++ class type as public type in dwarf debug info output.
...
llvm-svn: 132357
2011-05-31 20:46:46 +00:00
Alexis Hunt
e852b100e2
Implement a new type node, UnaryTransformType, designed to represent a
...
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.
llvm-svn: 132017
2011-05-24 22:41:36 +00:00
Devang Patel
f9076f3b45
Set up appropriate context for member function.
...
Radar 9440721
llvm-svn: 131441
2011-05-17 00:20:09 +00:00
Devang Patel
e91b54cc56
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131245
2011-05-12 21:29:57 +00:00
Devang Patel
70d77d144b
Do not add AT_APPLE_objc_class_extension attribute if @implementation is not seen.
...
llvm-svn: 131242
2011-05-12 21:14:54 +00:00
Devang Patel
36882c8f24
Use DW_AT_APPLE_objc_class_extension attribute to identify interfaces that represent class extension.
...
Radar 9423077.
llvm-svn: 131239
2011-05-12 19:07:41 +00:00
Devang Patel
979aba5d09
Do not drop uint128 on the floor.
...
llvm-svn: 130929
2011-05-05 17:06:30 +00:00
Fariborz Jahanian
fc0fe6eb52
Finish off rules for z-length bitfields in ms_struct
...
structs. // rdar://8823265
llvm-svn: 130783
2011-05-03 20:21:04 +00:00
Devang Patel
04ab75c9ab
Function with internal linkage name do not have mangled name.
...
llvm-svn: 130736
2011-05-02 22:49:30 +00:00
Devang Patel
b7ff0da623
Do not try to get mangled name of block helpers. Apply a stopgap measure to fix SingleSource/UnitTests/block-copied-in-cxxobj compile time crash.
...
llvm-svn: 130734
2011-05-02 22:37:48 +00:00
Fariborz Jahanian
eb39741c0b
More rule enforcement of zero bitfields for ms_struct.
...
llvm-svn: 130696
2011-05-02 17:20:56 +00:00
Nick Lewycky
fc49f72b58
Remove unused variable spotted by GCC.
...
Devang, can we remove this call entirely? If I try that, "make check" passes
but the call has a side-effect of ensuring that the block's context exists in
the debug info. getContextDescriptor() is used in a void context for that side-
effect elsewhere in this file. Please take a look!
llvm-svn: 130679
2011-05-02 01:41:48 +00:00
Devang Patel
a3e3fded0a
Tie constructor defintion with its declaration using AT_specification.
...
llvm-svn: 130561
2011-04-29 23:42:32 +00:00
Fariborz Jahanian
6d003c3041
Fixes debug info generation problem for ms_struct structs.
...
// rdar://8823265
llvm-svn: 130458
2011-04-28 23:43:23 +00:00
Devang Patel
e67eca43d6
We need pointer size in bits here.
...
llvm-svn: 130244
2011-04-26 21:16:49 +00:00
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
Douglas Gregor
b8c7fe9dc9
Debug info generation for rvalue references
...
llvm-svn: 124020
2011-01-22 01:58:15 +00:00
John McCall
424cec97bd
Change QualType::getTypePtr() to return a const pointer, then change a
...
thousand other things which were (generally inadvertantly) relying on that.
llvm-svn: 123814
2011-01-19 06:33:43 +00:00
Devang Patel
283e89dd22
Simplify.
...
llvm-svn: 123682
2011-01-17 22:23:07 +00:00
Devang Patel
bc47498973
Fix debug info for __block variable referenced outside of block.
...
llvm-svn: 123199
2011-01-11 00:30:27 +00:00
John McCall
8190451ddc
Introduce an AttributedType, but don't actually use it anywhere yet.
...
The initial TreeTransform is a cop-out, but it's more-or-less equivalent
to what we were doing before, or rather what we're doing now and might
eventually stop doing in favor of using this type.
I am simultaneously intrigued by the possibilities of rebuilding a
dependent Attri
llvm-svn: 122942
2011-01-06 01:58:22 +00:00
Abramo Bagnara
924a8f3573
Added ParenType type node.
...
llvm-svn: 121488
2010-12-10 16:29:40 +00:00
John McCall
717d9b0e2f
It's kindof silly that ExtQuals has an ASTContext&, and we can use that
...
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
llvm-svn: 121478
2010-12-10 11:01:00 +00:00
Devang Patel
8c44529c85
Remove unused parameter. getContextDescriptor() and getOrCreateNameSpace().
...
llvm-svn: 121333
2010-12-09 00:33:05 +00:00
Devang Patel
4591f7736a
Remove unused parameter.
...
llvm-svn: 121326
2010-12-09 00:25:29 +00:00
Devang Patel
00afcbe366
Start using DIBuilder. It provides cleaner interface.
...
llvm-svn: 121302
2010-12-08 22:42:58 +00:00
Douglas Gregor
2f53a0bbf2
Harden CGDebugInfo::CreateType() a bit for cases where we couldn't generate type info for its component types
...
llvm-svn: 120401
2010-11-30 06:38:09 +00:00
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Anders Carlsson
7f95cd1817
Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.
...
llvm-svn: 120133
2010-11-24 23:12:57 +00:00
Argyrios Kyrtzidis
d004064864
Refactoring of Diagnostic class.
...
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
2010-11-18 20:06:41 +00:00
Douglas Gregor
ad3832e213
Teach debug-info generation that SourceManager::getPresumedLoc() can
...
produce an invalid location even when given a valid location, if the
file system has changed underneath us. Recovery more gracefully.
llvm-svn: 118834
2010-11-11 20:45:16 +00:00
Douglas Gregor
1ccc8416a0
Remove broken support for variadic templates, along with the various
...
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.
But don't get too excited about that happening now.
llvm-svn: 118385
2010-11-07 23:05:16 +00:00