Eric Christopher
9f94fa368a
Tidy and remove some unused variables.
...
llvm-svn: 149015
2012-01-26 02:05:28 +00:00
Eric Christopher
5bfde1aa42
Collect this information together. No reason to have it split.
...
llvm-svn: 149013
2012-01-26 01:57:29 +00:00
Eric Christopher
a15e6352fe
Refactor into its own function.
...
llvm-svn: 149012
2012-01-26 01:57:13 +00:00
Eric Christopher
bfecca3331
Clean up comment.
...
llvm-svn: 148982
2012-01-25 21:47:09 +00:00
Eric Christopher
000b14e796
Refactor the record decl forward declaration code a bit.
...
llvm-svn: 148904
2012-01-25 02:06:59 +00:00
Eric Christopher
45c4d47b8a
When adding types to the context chain for record types, just emit
...
a forward declaration unless we already have a type. We can fill it in
later if it's actually used.
Fixes PR11345
llvm-svn: 148584
2012-01-20 22:10:15 +00:00
David Blaikie
e4d798f078
More dead code removal (using -Wunreachable-code)
...
llvm-svn: 148577
2012-01-20 21:50:17 +00:00
Richard Smith
dafff94759
constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,
...
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
2012-01-14 04:30:29 +00:00
Eric Christopher
8c363622d3
Formatting.
...
llvm-svn: 147989
2012-01-12 01:26:58 +00:00
Eric Christopher
ffbc4d0b68
Formatting.
...
llvm-svn: 147988
2012-01-12 01:26:51 +00:00
Richard Smith
5fab0c9e1a
Small refactoring and simplification of constant evaluation and some of its
...
clients. No functionality change.
llvm-svn: 147318
2011-12-28 19:48:30 +00:00
Eric Christopher
cd88813dbf
When in a limited debug information situation if we can find the original
...
declaration for the type then go ahead and use that, it's still smaller
than creating an all new derived type.
Part of rdar://10335756 and others.
llvm-svn: 146779
2011-12-16 23:40:18 +00:00
Eric Christopher
ea225fb412
Start down the path of getting clang to internally agree on structs versus
...
classes.
Part of rdar://10520586 and a couple others.
llvm-svn: 146778
2011-12-16 23:40:14 +00:00
Douglas Gregor
c8b0c9d8fd
When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.
...
llvm-svn: 146705
2011-12-15 23:32:29 +00:00
Douglas Gregor
dc9166c8e1
Keep track of all declarations of an Objective-C class (both forward
...
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"
llvm-svn: 146679
2011-12-15 20:29:51 +00:00
Eric Christopher
607fb70750
Make sure that forward declarations are marked as such in the debug info
...
for the structure type.
rdar://10499337
llvm-svn: 145461
2011-11-29 23:57:40 +00:00
Eric Christopher
459532e1d5
Use the canonical decl to index so that we can really find it later.
...
Fixes rdar://10433202
llvm-svn: 144938
2011-11-17 23:45:00 +00:00
Eric Christopher
04832b9210
Fixup comment.
...
llvm-svn: 144548
2011-11-14 18:55:02 +00:00
Nick Lewycky
1679035122
Reflow lines, remove else-if after returns, rename variable "TydefContext" to
...
"TypedefContext". No functionality change.
llvm-svn: 144248
2011-11-10 00:34:02 +00:00
Nick Lewycky
6aad6df4d1
Reflow one line I missed in previous cleanup commit. No functionality change.
...
llvm-svn: 144168
2011-11-09 04:27:23 +00:00
Nick Lewycky
2219ef0b68
Minor cleanup, mostly reindenting. Remove one helper function that just called
...
the other helper functions, since we already differentiated the cases it was
testing between. No functionality change.
llvm-svn: 144167
2011-11-09 04:25:21 +00:00
Richard Smith
7b553f1b19
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
...
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.
llvm-svn: 143263
2011-10-29 00:50:52 +00:00
Devang Patel
fa59ac363e
In case of template specialization, do not try to delay emitting debug info for concrete type in -flimit-debug-info mode. This fixes some of the failures from bs15503.exp tests in gdb testsuite.
...
llvm-svn: 143227
2011-10-28 21:12:13 +00:00
Devang Patel
242ce91ecc
Do not drop type qualifiers in -flimit-debug-info mode.
...
llvm-svn: 142873
2011-10-24 23:15:17 +00:00
Nick Lewycky
ba743b75cb
Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
...
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.
llvm-svn: 142633
2011-10-21 02:32:14 +00:00
John McCall
e314e27c58
Macro metaprogramming for builtin types.
...
llvm-svn: 142420
2011-10-18 21:02:43 +00:00
John McCall
8a6b59ad97
Add a new placeholder type to represent "unbridged"
...
casts in ARC.
No semantic analysis yet.
llvm-svn: 142208
2011-10-17 18:09:15 +00:00
Anton Korobeynikov
f0c267e6e0
Provide half floating point support as a storage only type.
...
Lack of half FP was a regression compared to llvm-gcc.
llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Benjamin Kramer
47b5b31e61
Simplify code to avoid a useless string copy.
...
llvm-svn: 141970
2011-10-14 18:45:16 +00:00
Benjamin Kramer
fd0b05f341
Upgrade to PathV2.
...
llvm-svn: 141969
2011-10-14 18:45:11 +00:00
Benjamin Kramer
13481e27cb
Add parens to pacify GCC.
...
llvm-svn: 141968
2011-10-14 18:45:06 +00:00
Eric Christopher
7cdf948601
Recommit:
...
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
after fixing a few bugs that were exposed in gdb testsuite testing.
llvm-svn: 141893
2011-10-13 21:45:18 +00:00
Eric Christopher
93663b3c62
Revert file/scope handling patches. gdb testing revealed a couple of bugs.
...
llvm-svn: 141796
2011-10-12 18:39:35 +00:00
Eric Christopher
663b7f353e
Remember to set the location in EmitGlobalVariable to the current decl
...
if we're going to delete the setLocation as we did in 141732.
llvm-svn: 141762
2011-10-12 01:11:30 +00:00
Eric Christopher
498b7fd7fe
Start handling debug line and scope information better:
...
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.
Finishes off the rest of rdar://10246360
llvm-svn: 141732
2011-10-11 23:00:55 +00:00
Eric Christopher
fefafacf68
80-column and tab cleanup.
...
llvm-svn: 141731
2011-10-11 23:00:51 +00:00
Eric Christopher
fb4cd4082c
Reorder this to make it easier to add more changes for a location set.
...
llvm-svn: 141730
2011-10-11 23:00:45 +00:00
Richard Smith
caf3390d44
Constant expression evaluation refactoring:
...
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
2011-10-10 18:28:20 +00:00
Eli Friedman
0dfb889575
Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.
...
Thanks to Jeffrey Yasskin for the thorough review!
llvm-svn: 141330
2011-10-06 23:00:33 +00:00
Eric Christopher
fab289a47d
When constructing debug information for synthesized variables for the
...
non-fragile ABI we may not be able to lay out the type and the debugger
would ignore us even if we did put in the offset. Go ahead and just
put any value there and don't look up the offset since it may not exist.
rdar://10210157
llvm-svn: 141261
2011-10-06 00:31:18 +00:00
Eric Christopher
8c552308c6
Reformat comment.
...
llvm-svn: 141260
2011-10-06 00:30:52 +00:00
Argyrios Kyrtzidis
b8c3aaf479
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.
...
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
2011-10-03 06:37:04 +00:00
Eric Christopher
2f45aaa755
Change "Regions" to be "LexicalBlocks" since that's what they
...
correspond to.
llvm-svn: 140740
2011-09-29 00:00:45 +00:00
Eric Christopher
bfa4dc5512
Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don't
...
exist anymore.
llvm-svn: 140739
2011-09-29 00:00:41 +00:00
Eric Christopher
4fd315ffbd
Reorder functions in the file.
...
llvm-svn: 140738
2011-09-29 00:00:37 +00:00
Eric Christopher
e655657c94
Call UpdateLineDirectiveRegion every time we want to emit a stop
...
point in the code. Ensures that we don't miss any places and the
check is reasonably cheap.
llvm-svn: 140737
2011-09-29 00:00:35 +00:00
Eric Christopher
250511bc75
Update comment.
...
llvm-svn: 140736
2011-09-29 00:00:31 +00:00
Eric Christopher
9c13eeac99
Update comments.
...
llvm-svn: 140531
2011-09-26 15:03:22 +00:00
Peter Collingbourne
a834166e48
Create a VTableContext class and start moving CodeGenVTables methods to it
...
llvm-svn: 140502
2011-09-26 01:56:30 +00:00
David Blaikie
9c902b5502
Rename Diagnostic to DiagnosticsEngine as per issue 5397
...
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
David Blaikie
aa347f9392
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
llvm-svn: 140407
2011-09-23 20:26:49 +00:00
David Blaikie
83d382b1ca
Switch assert(0/false) llvm_unreachable.
...
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Devang Patel
5a54065c4f
Tighten check to match an ivar with corresponding property by using ObjCImplementationDecl.
...
Radar 10139522 - Part 1.
llvm-svn: 140038
2011-09-19 18:54:16 +00:00
Devang Patel
ecaf9ac0bb
Emit debug info for c++0x nullptr.
...
llvm-svn: 139752
2011-09-14 23:14:14 +00:00
Eric Christopher
19329c402f
Formatting.
...
llvm-svn: 139681
2011-09-14 01:10:50 +00:00
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