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
Devang Patel
86f30f5a1d
Simplify. Builtin types' context is always implied.
...
llvm-svn: 117928
2010-11-01 16:52:40 +00:00
Anders Carlsson
fd88a6160d
Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
...
llvm-svn: 117881
2010-10-31 23:22:37 +00:00
Devang Patel
31d1e2153f
After processing named unions do not fall through to handle anonymous unions.
...
This is tested by funcargs.exp in gdb testsuite.
llvm-svn: 117659
2010-10-29 16:21:19 +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
faadd7b72d
Directly use NamespaceDecl->getLocation() to find the source file.
...
llvm-svn: 117576
2010-10-28 19:12:46 +00:00
Devang Patel
8e0073008a
Stay within 80 columns.
...
llvm-svn: 117561
2010-10-28 17:27:32 +00:00
Devang Patel
1bee63f325
Fix context info for enums.
...
Radar 8595129
llvm-svn: 117507
2010-10-27 23:23:58 +00:00
Devang Patel
db3910000a
Revert unintentional check-in.
...
llvm-svn: 117120
2010-10-22 18:31:12 +00:00
Devang Patel
f79199d140
Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
...
This is tested by local.C in llvmgcc testsuite.
llvm-svn: 117107
2010-10-22 17:11:50 +00:00
Fariborz Jahanian
f34011e4ca
patch fixes class names missing from method names in debug information for
...
synthesized property. // rdar: //8498026
llvm-svn: 116717
2010-10-18 17:51:06 +00:00
Devang Patel
0f58561907
Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
...
This is tested by virtfunc.exp in gdb testsuite.
llvm-svn: 116535
2010-10-14 22:59:23 +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
Fariborz Jahanian
77890879dd
Fixes a typo which caused byte offset in debug info
...
for ivars to be 0. Fixes pr8353.
llvm-svn: 116273
2010-10-11 23:55:47 +00:00
Devang Patel
33ddf69fb3
Fix debug info for functions whose context is a namespace.
...
This is tested by namespace.exp in gdb testsuite.
llvm-svn: 116248
2010-10-11 21:58:41 +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
251f859b23
Identify functions with prototype appropriately in debug info.
...
This is tested by callfuncs.exp in gdb testsuite.
llvm-svn: 115989
2010-10-07 22:03:49 +00:00
Devang Patel
284fa417ec
Mark FunctionNoProtoType's argument as unspecified parameters.
...
llvm-svn: 115834
2010-10-06 20:51:45 +00:00
Devang Patel
c0601d1e99
Do not emit subrange for incomplete array type.
...
This is tested by ptype.exp in gdb testsuite.
llvm-svn: 115805
2010-10-06 18:30:00 +00:00
Devang Patel
5b389f495b
Remove unused argument.
...
llvm-svn: 115789
2010-10-06 15:58:57 +00:00
Devang Patel
d18c5aa20a
Mark explict methods as explict in debug info.
...
llvm-svn: 115379
2010-10-01 23:32:17 +00:00
Fariborz Jahanian
885e9dff93
Output debug info. for ivars declared in class
...
extension and implementation.
Fixes rdar://8493239.
llvm-svn: 115248
2010-10-01 00:01:53 +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
Devang Patel
7c086227e6
Attach aritifical attribute with implicit parameters.
...
Radar 8493141.
llvm-svn: 115104
2010-09-29 23:09:21 +00:00
Devang Patel
330b65e350
Emit method access specifier.
...
Radar 8490416.
llvm-svn: 115090
2010-09-29 21:46:16 +00:00
Devang Patel
db2732ac42
Update to reflect DIFactory::CreateSubprogram() interface change from r115084.
...
llvm-svn: 115085
2010-09-29 21:05:52 +00:00
Devang Patel
984cdeef37
Remove dead code.
...
llvm-svn: 115079
2010-09-29 20:05:01 +00:00
Benjamin Kramer
3e0c527dcc
Adjust for debug info API change.
...
llvm-svn: 114438
2010-09-21 15:59:59 +00:00
Gabor Greif
bf98608a3d
do not rely on the implicit-dereference semantics of dyn_cast_or_null
...
llvm-svn: 114281
2010-09-18 13:00:17 +00:00
Devang Patel
28b5286bda
While handling change of file, check if _current_ file is already seen or not. If current file is seen then it indicates that end of previous file's lexical scope.
...
This fixes radar 8396182.
llvm-svn: 114018
2010-09-15 20:50:40 +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
David Chisnall
6bf98ff491
Use the unmangled name for the display name in Objective-C debug info. This should have no effect with the Mac runtime where clang (unlike GCC) uses the display name symbol name.
...
llvm-svn: 112833
2010-09-02 17:16:32 +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
22e99c2bad
Fix enum size and align. Tested by setvar.exp in gdb testsuite.
...
llvm-svn: 111936
2010-08-24 18:14:06 +00:00
Daniel Dunbar
64c222a6bc
Debug Info: Put full Clang version into the debug info, to make it easier to
...
identify what version of the compiler was used to build something.
llvm-svn: 111927
2010-08-24 17:41:09 +00:00
Devang Patel
41c2097058
Emit debug info for enum constants.
...
llvm-svn: 111852
2010-08-23 22:07:25 +00:00
Dan Gohman
66427b1fcf
Reinstate the code for emitting an initial debug type for a struct,
...
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.
llvm-svn: 111842
2010-08-23 21:15:56 +00:00
Eli Friedman
04831926ec
Detabify.
...
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
Dan Gohman
25f9aaedc6
Delete an obsolete comment.
...
llvm-svn: 111711
2010-08-21 02:41:29 +00:00
Dan Gohman
b1aac3362c
CreateTemporaryType doesn't needs its Context argument.
...
llvm-svn: 111688
2010-08-20 22:39:57 +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
caa23f0708
Emit debug info for static const class member.
...
llvm-svn: 110885
2010-08-12 00:02:44 +00:00
Devang Patel
8166571a25
Simplify
...
llvm-svn: 110716
2010-08-10 20:16:57 +00:00
Devang Patel
76e3b53541
Do not use DIGlobalVariable to emit debugging information for enums.
...
llvm-svn: 110697
2010-08-10 18:27:15 +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
c7f16ab3e3
Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.
...
llvm-svn: 109694
2010-07-28 23:23:29 +00:00
Devang Patel
a652fab052
construct debug info for "id" by hand.
...
Tested by mi1-var-obj.exp in gdb testsuite.
llvm-svn: 109571
2010-07-28 01:33:15 +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
cb9fe9ec16
Revert r109263.
...
llvm-svn: 109284
2010-07-23 23:04:28 +00:00
Devang Patel
28f167699a
There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.
...
llvm-svn: 109263
2010-07-23 20:38:37 +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
222f4be834
ObjCId is special "struct objc_object". Make this explicit in debug info.
...
This is tested by objc-rbreak.exp in gdb testsuite.
llvm-svn: 109050
2010-07-21 22:41:25 +00:00
Devang Patel
0043977f09
Remove unintended code that was checked in as part of r108916.
...
llvm-svn: 108951
2010-07-20 22:32:37 +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
Stuart Hastings
7d7bc561bf
Correct line info for declarations/definitions. Radar 8063111.
...
llvm-svn: 108785
2010-07-19 23:56:31 +00:00
Devang Patel
8fd6499a97
Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.
...
llvm-svn: 108471
2010-07-15 23:09:46 +00:00
Devang Patel
b3026df9fa
Mark implementation generated methods as artificial.
...
Tested by namespace.exp and virtfunc.exp from gdb testsuite.
llvm-svn: 108468
2010-07-15 22:57:00 +00:00
Devang Patel
99c372134d
Revert 108220 and subsequent patch.
...
This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch.
llvm-svn: 108434
2010-07-15 18:16:09 +00:00
Devang Patel
01c8c100c2
Add volatile qualifiers for "this".
...
llvm-svn: 108245
2010-07-13 16:23:13 +00:00
Devang Patel
0a34e31d81
const qualify debug info for "this" for const methods.
...
llvm-svn: 108220
2010-07-13 00:24:30 +00:00
Devang Patel
0aabb1200f
While collecting members for a class, always create delcaration entry for methods. Debug info for method definition will be generated while generating code for method body.
...
Tested by classes.exp in gdb testsuite.
llvm-svn: 108205
2010-07-12 22:54:41 +00:00
Devang Patel
8f3f76f991
Handle forward declarations properly in debug info.
...
Patch by Alexander Kabaev.
PR 7595.
llvm-svn: 107900
2010-07-08 19:56:29 +00:00
Anders Carlsson
ea836bc41c
Switch over to the new caching version of getMangledName.
...
llvm-svn: 106549
2010-06-22 16:16:50 +00:00
Chandler Carruth
8509824cdb
Move CodeGenOptions.h *back* into Frontend. This should have been done when the
...
dependency edge was reversed such that CodeGen depends on Frontend.
llvm-svn: 106065
2010-06-15 23:19:56 +00:00
Devang Patel
6ccba0fb6e
Preserve type info for local variables in optimized builds.
...
llvm-gcc enabled this couple of weeks ago.
llvm-svn: 105516
2010-06-05 01:14:40 +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
ec2a9abd4a
Fix thinko in yesterday's fix.
...
Providing linkage name for function static variable confuses gdb, so don't do that.
llvm-svn: 103779
2010-05-14 16:55:25 +00:00
Devang Patel
98f217118f
Fix context in class static variable's debugging information entry.
...
This fixes bunch of failures in gdb testsuite.
llvm-svn: 103745
2010-05-13 23:52: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
Abramo Bagnara
6150c884df
Merged Elaborated and QualifiedName types.
...
llvm-svn: 103517
2010-05-11 21:36:43 +00:00
Devang Patel
82bbfb58e3
Initialize Column.
...
llvm-svn: 103448
2010-05-10 23:48:38 +00:00
Devang Patel
b319adec49
If variable location is invalid then use current location.
...
This fixes radar 7959934.
llvm-svn: 103408
2010-05-10 17:24:58 +00:00
Devang Patel
67eba80672
If there is not any debug info for type then do not emit debug info for this variable.
...
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.
llvm-svn: 103320
2010-05-07 23:05:55 +00:00
Devang Patel
ba4ad7f2fd
Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103273
2010-05-07 18:12:35 +00:00
Douglas Gregor
c8be95274d
When instantiating a function that was declared via a typedef, e.g.,
...
typedef int functype(int, int);
functype func;
also instantiate the synthesized function parameters for the resulting
function declaration.
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025
2010-05-04 18:18:31 +00:00
Devang Patel
dfcd0661a1
Use clang::VarDecl name instead of llvm::GlobalVariable name.
...
llvm::GLobalVariable name may not match user visibile name for function static variables.
llvm-svn: 102644
2010-04-29 17:48:37 +00:00
John McCall
2408e32096
Make the InjectedClassNameType the canonical type of the current instantiation
...
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).
llvm-svn: 102407
2010-04-27 00:57:59 +00:00
Devang Patel
42fb6f8b9a
Enable debug info for local variables at -O1+.
...
llvm-svn: 102398
2010-04-26 23:28:46 +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
Devang Patel
8471593892
Revert accidental check-in.
...
llvm-svn: 102226
2010-04-24 00:49:16 +00:00
Devang Patel
f8b55d478c
Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.
...
llvm-svn: 102224
2010-04-24 00:40:35 +00:00
Devang Patel
b9ab309650
Encode field accessibility.
...
llvm-svn: 102033
2010-04-21 23:12:37 +00:00
Anders Carlsson
11e5140db9
Vtable -> VTable renames across the board.
...
llvm-svn: 101666
2010-04-17 20:15:18 +00:00
Devang Patel
a2c048eaf8
Emit debug info for objc getters and setters.
...
llvm-svn: 100462
2010-04-05 21:09:15 +00:00
Chris Lattner
18a584b56c
NewDebugLoc got renamed to DebugLoc.
...
llvm-svn: 100219
2010-04-02 20:21:43 +00:00
Chris Lattner
e675d0f924
adjust to IRBuilder change and use faster DebugLoc apis.
...
llvm-svn: 100093
2010-04-01 06:31:43 +00:00
Chris Lattner
be49c03ff4
use the new optimized debug info metadata accessors. In
...
addition to the inherent win, this eliminates the pointless
cost of going through the name -> mdkind stringmap that we
were paying.
llvm-svn: 99983
2010-03-31 03:36:01 +00:00
Benjamin Kramer
9e649c3cfe
Replace some constant-sized SmallVectors.
...
llvm-svn: 99884
2010-03-30 11:36:44 +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
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
Anders Carlsson
a864caff8c
Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.
...
llvm-svn: 99250
2010-03-23 04:11:45 +00:00
Douglas Gregor
65f7a3f801
Comment the reasons for the strange little dance we do with the main file name for debug information
...
llvm-svn: 99215
2010-03-22 21:28:29 +00:00
John McCall
7ec5043c2c
Change CodeGenModule to rely on the Module's symbol table instead of
...
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board. We'll see how it plays out.
Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.
llvm-svn: 99012
2010-03-19 23:29:14 +00:00
Douglas Gregor
fc7a4813ab
Try to improve computation of the main file name for debug
...
information, to address recent gdb failures.
llvm-svn: 98959
2010-03-19 14:49:09 +00:00
Douglas Gregor
c6b5a3df1e
For debug information, get the main file name from the source manager
...
rather than from the -main-file-name flag, since the source manager
has proper path information. Fixes <rdar://problem/7769538>.
llvm-svn: 98898
2010-03-18 23:46:43 +00:00
Benjamin Kramer
69b3c43391
Use raw_ostream instead of sprintf.
...
llvm-svn: 98438
2010-03-13 12:06:51 +00:00
Devang Patel
a42d3ea60e
If main file name is empty then use "<unknown>".
...
llvm-svn: 98385
2010-03-12 21:04:27 +00:00
Devang Patel
01bb5ce932
Keep track of Record context to ensure that record elements are properly nested in debug info.
...
llvm-svn: 98283
2010-03-11 20:01:48 +00:00
Anders Carlsson
4cbe83cccb
Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.
...
llvm-svn: 98248
2010-03-11 07:15:17 +00:00
John McCall
e78aac41de
Create a new InjectedClassNameType to represent bare-word references to the
...
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).
Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.
llvm-svn: 98134
2010-03-10 03:28:59 +00:00
Devang Patel
05c37d2800
Use SmallString instead of alloca.
...
llvm-svn: 98112
2010-03-10 00:19:43 +00:00
Devang Patel
93f274c161
Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.
...
llvm-svn: 98096
2010-03-09 22:49:11 +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
f2aa707895
Use getLast() instead of getBasename().
...
llvm-svn: 98072
2010-03-09 19:14:07 +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
d3cbaa1ddf
Avoid using DIDescriptor.isNull().
...
llvm-svn: 97976
2010-03-08 20:53:17 +00:00
Devang Patel
9cf2705a5d
Revert r97949.
...
llvm-svn: 97964
2010-03-08 19:20:58 +00:00
Devang Patel
4ce8ebb087
Avoid DIDescriptor.isNull() checks.
...
llvm-svn: 97949
2010-03-08 18:26:57 +00:00
Sanjiv Gupta
9ac3092d34
Targets (like pic16) may have mangled the name of global variables,
...
so get the name from Var rather than the original decl.
llvm-svn: 97114
2010-02-25 05:20:44 +00:00
Devang Patel
b407338fe2
Emit debug info for VectorType.
...
llvm-svn: 96999
2010-02-23 22:59:39 +00:00