Граф коммитов

84 Коммитов

Автор SHA1 Сообщение Дата
Devang Patel cebbedd237 Fix debug info for anon union.
This is tested by anon-union.exp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:24:54 +00:00
John McCall 189d6ef40e Permit constant evaluation of const floating-point variables with
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-09 01:34:31 +00:00
Devang Patel d2829b76a8 Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115789 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06 15:58:57 +00:00
Devang Patel c69e1cf043 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30 19:05:55 +00:00
David Chisnall 52044a2cb6 Tidy up last commit, as per Devang's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112840 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 18:01:51 +00:00
Devang Patel 2ed8f00086 Debug info for friends!
Patch originally by Alexander Herz.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 17:47:47 +00:00
Devang Patel 6237cea785 Emit debug info for enum constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 22:07:25 +00:00
Dan Gohman 4cac5b48e3 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 22:02:57 +00:00
Devang Patel 25c2c8fb93 Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 17:53:33 +00:00
Devang Patel 8d308384a2 Even if a constant's evaluated value is used, emit debug info for the constant variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 07:24:25 +00:00
Devang Patel 58115009ba Always use current working directory for DW_AT_comp_dir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27 20:49:59 +00:00
Devang Patel ac4d13c0cc Reapply 109303.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27 15:17:16 +00:00
Devang Patel e9b711c398 Revert 109303.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 18:49:27 +00:00
Devang Patel 05b0f4195e 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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 00:59:16 +00:00
Devang Patel 5a6fbcfd8c 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 22:29:16 +00:00
Devang Patel 4d939e6414 Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:20:10 +00:00
Devang Patel 700a1cb1d2 Print template argument names for template class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:24:18 +00:00
John McCall c12c5bba6c 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-15 11:32:37 +00:00
Devang Patel 8ab870d34f 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12 23:46:38 +00:00
Benjamin Kramer d3651cc24f Fix pasto, add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 20:26:20 +00:00
Benjamin Kramer 48c70f62dd Factor code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 20:19:58 +00:00
Anders Carlsson 046c294a43 Vtable -> VTable renames across the board.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 20:15:18 +00:00
Benjamin Kramer 6876fe615e Minor include pruning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 15:04:05 +00:00
Ted Kremenek 9c25039c4b Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
This reduces '-c -g' time on one file in 403.gcc by 12%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99857 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 00:27:51 +00:00
Ted Kremenek a1d2d397d6 Remove FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99828 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-29 19:10:41 +00:00
Ted Kremenek 590838badd 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%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-29 18:29:57 +00:00
Devang Patel 7573f8b2f9 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 21:32:27 +00:00
Devang Patel 1780055f6d Start using DIFile. Corresponding llvm patch is r98020.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 00:44:50 +00:00
Devang Patel 70c23cdf12 Emit debug info for VectorType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96999 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 22:59:39 +00:00
Devang Patel 809b9bb733 Refactor code that generates debug info for variables that has BlocksAttr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95786 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 18:49:08 +00:00
Devang Patel abb485f0b5 Emit debug info for namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94991 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 19:16:32 +00:00
Devang Patel 3dd96a1489 Maintain a map of regions (lexical scopes) and use it to find context for a global variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 18:11:03 +00:00
Devang Patel 3358305558 s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 23:15:27 +00:00
Devang Patel 89f05f8023 s/FunctionNames/DebugInfoNames/g
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94753 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:21:00 +00:00
Devang Patel 4ce3f2026a Emit vtable info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94751 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:11:52 +00:00
Devang Patel a6da192bbb Include "this" pointer argument while emitting debug info for a C++ method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 00:28:01 +00:00
Anders Carlsson 4433f1cf8a Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94519 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:19:50 +00:00
Anders Carlsson d6f9a0d14b Factor creating the DISubprogram for a member function out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:49:33 +00:00
Devang Patel a245c5b36a First cut at emitting inheritance info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:32:18 +00:00
Devang Patel 4125fd20ef First cut at emitting debugging information for C++ member functions.
There is lot more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 01:54:44 +00:00
Devang Patel 428deb524a Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93814 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 00:00:59 +00:00
Devang Patel 9c6c3a0e3a Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 00:36:21 +00:00
Benjamin Kramer 155fd79b3a Use StringRef in CGDebugInfo::EmitFunctionStart.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 14:04:35 +00:00
Anders Carlsson 20f12a20ba Add rudimentary support for member pointers to CGDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 18:00:51 +00:00
Devang Patel 8fae060d6e Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:10:24 +00:00
Anders Carlsson a031b35ba4 Simplify the debug info code, handle lvalue references and template specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86277 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 19:19:55 +00:00
Mike Stump 91cc815ffd Fixup the return type of functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-23 01:52:13 +00:00
Devang Patel bbd9fa4b4a Add support to attach debug info to an instruction.
This is not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 18:36:08 +00:00
Devang Patel 979ec2e5ee Set appropriate context for a global variable while emitting debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 00:35:31 +00:00
Mike Stump b1a6e68796 Improve debugging information for BlockDeclRefExpr. WIP. Given this
scheme, we can switch the previous scheme over to using this code
path.  There's a bit of simplifications yet to do as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-30 02:43:10 +00:00