aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
AgeCommit message (Collapse)Author
2010-08-21Delete an obsolete comment.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20CreateTemporaryType doesn't needs its Context argument.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman
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-12Emit debug info for static const class member.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10SimplifyDevang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Do not use DIGlobalVariable to emit debugging information for enums.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Simplify code and add comments, in code that generate debug info for ↵Devang Patel
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-10Even if a constant's evaluated value is used, emit debug info for the ↵Devang Patel
constant variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28Override selected builtin names (e.g. "long int" instead of "long") to match ↵Devang Patel
names used by gcc in debug info. This makes gdb testsuite happy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28construct debug info for "id" by hand. Devang Patel
Tested by mi1-var-obj.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109571 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Always use current working directory for DW_AT_comp_dir.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Reapply 109303. Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26Revert 109303.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24Untangle filename/dirname confusion. Store constructed strings on the side. ↵Devang Patel
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-23Revert r109263.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23There is no need to use separate dir name for AT_comp_dir attribute. Using ↵Devang Patel
absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Keep track of artificial scopes introduced by line directives. For example,Devang Patel
#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-21ObjCId is special "struct objc_object". Make this explicit in debug info.Devang Patel
This is tested by objc-rbreak.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109050 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Remove unintended code that was checked in as part of r108916.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Remove unused argument.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20Print template argument names for template class.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Correct line info for declarations/definitions. Radar 8063111.Stuart Hastings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108785 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15Set "optimization is ON" and supply other optional parameters. This helps ↵Devang Patel
codegenerator preserve info in case the symbol is deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15Mark implementation generated methods as artificial.Devang Patel
Tested by namespace.exp and virtfunc.exp from gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15Revert 108220 and subsequent patch. Devang Patel
This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108434 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13Add volatile qualifiers for "this".Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13const qualify debug info for "this" for const methods.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12While collecting members for a class, always create delcaration entry for ↵Devang Patel
methods. Debug info for method definition will be generated while generating code for method body. Tested by classes.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08Handle forward declarations properly in debug info.Devang Patel
Patch by Alexander Kabaev. PR 7595. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22Switch over to the new caching version of getMangledName.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15Move CodeGenOptions.h *back* into Frontend. This should have been done when theChandler Carruth
dependency edge was reversed such that CodeGen depends on Frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-05Preserve type info for local variables in optimized builds. Devang Patel
llvm-gcc enabled this couple of weeks ago. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-15Substantially alter the design of the Objective C type AST by introducingJohn McCall
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-14Fix thinko in yesterday's fix.Devang Patel
Providing linkage name for function static variable confuses gdb, so don't do that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13Fix context in class static variable's debugging information entry.Devang Patel
This fixes bunch of failures in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12If given location is invalid then use current location.Devang Patel
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-11Merged Elaborated and QualifiedName types.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10Initialize Column.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10If variable location is invalid then use current location.Devang Patel
This fixes radar 7959934. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07If there is not any debug info for type then do not emit debug info for this ↵Devang Patel
variable. A recent change to tightly verify debug info prepared by FE caught this. This fixes unittest build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103320 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-04When instantiating a function that was declared via a typedef, e.g.,Douglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29Use clang::VarDecl name instead of llvm::GlobalVariable name.Devang Patel
llvm::GLobalVariable name may not match user visibile name for function static variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-27Make the InjectedClassNameType the canonical type of the current instantiationJohn McCall
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-26Enable debug info for local variables at -O1+. Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24Fix pasto, add a comment.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24Factor code. No functionality change.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24Revert accidental check-in.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24Revert r102215. This causes clang crash while compiling a test case from gdb ↵Devang Patel
testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-21Encode field accessibility.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102033 91177308-0d34-0410-b5e6-96231b3b80d8