summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* This is always going to be true so the cast isn't necessary.Eric Christopher2012-08-131-5/+3
| | | | llvm-svn: 161744
* If we don't have a complete type for the array type yet either thenEric Christopher2012-08-071-1/+4
| | | | | | | | just let the alignment be zero. PR13531 llvm-svn: 161379
* Remove some unintended changes from my last patch.Eric Christopher2012-08-071-3/+2
| | | | llvm-svn: 161369
* Make sure when we get the replacement type for a template argumentEric Christopher2012-08-071-5/+14
| | | | | | | | that we attach the lost qualifiers. Fixes rdar://11882155 llvm-svn: 161368
* Simplify code, no functionality change.Benjamin Kramer2012-08-041-6/+2
| | | | llvm-svn: 161303
* Fix the name of this variable.Eric Christopher2012-08-041-4/+4
| | | | llvm-svn: 161287
* Update comment to accurately reflect what should happen.Eric Christopher2012-08-041-1/+1
| | | | llvm-svn: 161286
* Temporarily revert this to see if it brings the gdb bot back.Eric Christopher2012-07-111-0/+4
| | | | llvm-svn: 160049
* The end of a block doesn't necessarily need a line table entry unlessEric Christopher2012-07-111-4/+0
| | | | | | | | | | there's something going on there. Remove the unconditional line entry and only add one if we're emitting cleanups (any other statements would be handled normally). Fixes rdar://9199234 llvm-svn: 160033
* Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used ↵Benjamin Kramer2012-07-041-1/+1
| | | | | | | | instead. No functionality change. llvm-svn: 159719
* Fix grammar.Eric Christopher2012-06-281-1/+1
| | | | llvm-svn: 159321
* Don't circumvent the debug info type cache when emitting info for ↵Benjamin Kramer2012-06-201-2/+3
| | | | | | | | | | | | EnumConstantDecl. CreateEnumType doesn't participate in caching so the descriptor for the enum gets recomputed for every reference of an element of an enum, only to get discarded when it gets turned into an MDNode. No functionality change except performance. llvm-svn: 158832
* Restructure how the driver communicates information about theJohn McCall2012-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Remove unused variable.Bill Wendling2012-06-121-1/+0
| | | | llvm-svn: 158353
* [C++11 Compat] Fix breaking change in C++11 pair copyctor.Michael J. Spencer2012-06-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While this code is valid C++98, it is not valid C++11. The problem can be reduced to: class MDNode; class DIType { operator MDNode*() const {return 0;} }; class WeakVH { WeakVH(MDNode*) {} }; int main() { DIType di; std::pair<void*, WeakVH> p(std::make_pair((void*)0, di))); } This was not detected by any of the bots we have because they either compile C++98 with libstdc++ (which allows it), or C++11 with libc++ (which incorrectly allows it). I ran into the problem when compiling with VS 2012 RC. Thanks to Richard for explaining the issue. llvm-svn: 158245
* Plug a long standing memory leak in TemplateArgument.Benjamin Kramer2012-06-071-1/+1
| | | | | | | | | | | | | | | The integral APSInt value is now stored in a decomposed form and the backing store for large values is allocated via the ASTContext. This way its not leaked as TemplateArguments are never destructed when they are allocated in the ASTContext. Since the integral data is immutable it is now shared between instances, making copying TemplateArguments a trivial operation. Currently getting the integral data out of a TemplateArgument requires creating a new APSInt object. This is cheap when the value is small but can be expensive if it's not. If this turns out to be an issue a more efficient accessor could be added. llvm-svn: 158150
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-3/+3
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Reapply "Only emit debug information for methods that are user defined, there's"Eric Christopher2012-06-051-2/+6
| | | | | | | | As the failing testcase has been fixed. This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e. llvm-svn: 158009
* Revert "Only emit debug information for methods that are user defined, there's"John McCall2012-06-051-6/+2
| | | | | | | This reverts r157970, which was not passing on clang-x86_64-darwin10-nobootstrap-RA llvm-svn: 157983
* Only emit debug information for methods that are user defined, there'sEric Christopher2012-06-051-2/+6
| | | | | | | | | not much reason to emit for constructors and destructors that aren't user defined. rdar://11593099 llvm-svn: 157970
* Support C++11 enum forward declarations.Eric Christopher2012-06-011-1/+2
| | | | | | Part of rdar://11570854 llvm-svn: 157787
* Emit C++11 enum class information if it exists.Eric Christopher2012-05-231-1/+4
| | | | | | Part of rdar://11496790 llvm-svn: 157304
* Revert r115805. An array type is required to have a range type,Eric Christopher2012-05-211-18/+14
| | | | | | | | | | however, the range can be unknown for the upper bound. Testcase to follow. Part of rdar://11457152 llvm-svn: 157212
* Update API usage for llvm DIBuilder changes for rvalue referenceEric Christopher2012-05-191-4/+6
| | | | | | | | types and ensure we are actually creating the type. rdar://11479676 llvm-svn: 157095
* Remove unnecessary temporary.Eric Christopher2012-05-161-3/+1
| | | | llvm-svn: 156953
* The address of a vla is actually complex and requires a dereference.Eric Christopher2012-05-081-1/+18
| | | | | | Part of rdar://11352000 llvm-svn: 156407
* Whitespace.Eric Christopher2012-05-081-1/+0
| | | | llvm-svn: 156406
* Make BuiltinType::getName return a StringRef and introduce ↵Argyrios Kyrtzidis2012-05-051-1/+1
| | | | | | | | | | | | | BuiltinType::getNameAsCString to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 llvm-svn: 156227
* This patch adds a new Clang compiler flag "-gline-tables-only".Alexey Samsonov2012-05-041-17/+43
| | | | | | | | | | | | | | It reduces the amount of emitted debug information: 1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only. 2) .debug_str contains only function names. 3) No debug data for types/namespaces/variables is emitted. 4) The data in .debug_line is enough to produce valid stack traces with function names and line numbers. Reviewed by Eric Christopher. llvm-svn: 156160
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-3/+3
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Use enum to set debug info size generated by ClangAlexey Samsonov2012-04-271-2/+2
| | | | llvm-svn: 155697
* Forward declarations should take a context. This helps the debuggerEric Christopher2012-04-231-7/+6
| | | | | | | | | find forward declarations in the context that the actual definition will occur. rdar://11291658 llvm-svn: 155381
* Avoid string thrashing when we can concatenate them in the final buffer.Benjamin Kramer2012-04-131-8/+8
| | | | llvm-svn: 154678
* static functions have a need for mangled name debug information too.Eric Christopher2012-04-121-3/+4
| | | | | | | | | The mangler doesn't like non-prototyped functions so only use a mangled name for prototyped functions. rdar://11079003 llvm-svn: 154570
* Enable debug info for objective c implementations that may not haveEric Christopher2012-04-111-1/+11
| | | | | | | | an explicit instance variable. rdar://10590352 llvm-svn: 154481
* Only emit the getter and setter names if they're not the defaultEric Christopher2012-04-051-5/+13
| | | | | | | | synthesized ones. Reasonable debug info size reduction for objc. rdar://11179756 llvm-svn: 154129
* Change location information for synthesized properties to be at theEric Christopher2012-04-031-5/+6
| | | | | | | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Use the current scope location as a separate parameter so that we can match it up better in the line table with the beginning of the scope. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart and for the new metadata parameter and add a new testcase to make sure we've got the right line numbers for synthesized properties. Part of rdar://11026482 llvm-svn: 153917
* Revert previous commit changing location information to see if thisEric Christopher2012-03-301-4/+5
| | | | | | is causing the gdb test failures on the bots. llvm-svn: 153727
* Change location information for synthesized properties to be at theEric Christopher2012-03-301-5/+4
| | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart. Fixes rdar://11026482 llvm-svn: 153714
* Go back to using just the selector name for the getter and setterEric Christopher2012-03-291-8/+13
| | | | | | | | in the property debug info. Any more isn't necessary after all. rdar://11144023 llvm-svn: 153659
* Add support for objc property decls according to the page at:Eric Christopher2012-03-291-17/+22
| | | | | | | | | | | http://llvm.org/docs/SourceLevelDebugging.html#objcproperty including type and DECL. Expand the getter and setter names into the fully qualified names. rdar://11144023 llvm-svn: 153640
* Simplify some users of DenseMap::erase.Benjamin Kramer2012-03-241-4/+1
| | | | llvm-svn: 153389
* Update comment.Eric Christopher2012-03-201-2/+1
| | | | llvm-svn: 153149
* Debug info: Tighten up uses of plain MDNode pointers which don't survive ↵Benjamin Kramer2012-03-201-15/+13
| | | | | | | | replaceOperandWith. TrackingVH notices when it gets RAUW'd. Fixes PR12305 and PR12315. llvm-svn: 153115
* Add support to mangle templated member function names with templateEric Christopher2012-03-141-1/+14
| | | | | | | | args. Fixes rdar://11042577 llvm-svn: 152691
* When adding member functions to a class add any specializations ofEric Christopher2012-03-131-9/+22
| | | | | | | | | | | function templates as well. A future commit will mangle the added name with the template args like classes are mangled. Fixes rdar://10986010 llvm-svn: 152683
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-10/+10
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Reapply r151702 with a small fix for a failure to cut and pasteEric Christopher2012-03-011-30/+61
| | | | | | | | correctly. Still rdar://10900684 llvm-svn: 151838
* Revert r151702, "Add support for handling captured variables in lambda debugDaniel Dunbar2012-02-291-61/+30
| | | | | | info.", which broke some -O0 -g tests. llvm-svn: 151730
* Add support for handling captured variables in lambda debug info.Eric Christopher2012-02-291-30/+61
| | | | | | | | | | | | This currently doesn't handle capturing the 'this' pointer for any enclosing class. Steal the lambda-expressions.cpp testcase and debugify it and try to use more variables to proof it against random changes. Part of rdar://10900684 llvm-svn: 151702
OpenPOWER on IntegriCloud