summaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
Commit message (Collapse)AuthorAge
* Avoid using "Type" as the variable name.Devang Patel2010-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94262 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure ValueFn starts off emptyVictor Hernandez2010-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94256 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid unnecessary Elts arrayVictor Hernandez2010-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93978 91177308-0d34-0410-b5e6-96231b3b80d8
* Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts ↵Victor Hernandez2010-01-18
| | | | | | array git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93764 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace DebugLocTuple with DILocation.Devang Patel2010-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93630 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-15
| | | | | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93531 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be ↵Victor Hernandez2010-01-15
| | | | | | auto-upgraded git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93515 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-15
| | | | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93504 91177308-0d34-0410-b5e6-96231b3b80d8
* Respond to Chris' review:Victor Hernandez2010-01-11
| | | | | | | | | Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t. Get constness correct for getVariable() and getValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93149 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead debug info intrinsics.Devang Patel2010-01-05
| | | | | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start AutoUpgrade simply ignores these intrinsics now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92557 91177308-0d34-0410-b5e6-96231b3b80d8
* fix Analysis/DebugInfo.h to not include Metadata.h. Do thisChris Lattner2009-12-31
| | | | | | | | by moving one method out of line and eliminating redundant checks from other methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92337 91177308-0d34-0410-b5e6-96231b3b80d8
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-31
| | | | | | | | things that occur in types. "operands" are things that occur in values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92322 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize MDNode to coallocate the operand list immediatelyChris Lattner2009-12-31
| | | | | | | | | | | | | | after the MDNode in memory. This eliminates the operands pointer and saves a new[] per node. Note that the code in DIDerivedType::replaceAllUsesWith is wrong and quite scary. A MDNode should not be RAUW'd with something else: this changes all uses of the mdnode, which may not be debug info related! Debug info should use something non-mdnode for declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92321 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a bunch of unneeded functions.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92263 91177308-0d34-0410-b5e6-96231b3b80d8
* major cleanups, much of this file was incorrectly indented.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92262 91177308-0d34-0410-b5e6-96231b3b80d8
* one pass of cleanup over DebugInfo.h. Much more is still needed.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92261 91177308-0d34-0410-b5e6-96231b3b80d8
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-29
| | | | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-28
| | | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-28
| | | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-23
| | | | | | | s/errs/dbgs/g except for certain special cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92032 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to emit debug info for C++ namespaces.Devang Patel2009-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91440 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 90858 90875 and 90805 for now.Devang Patel2009-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90898 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()Victor Hernandez2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to emit debug info for c++ style namespaces.Devang Patel2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90805 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the "@llvm.dbg.value" debug intrinsic.Victor Hernandez2009-12-07
| | | | | | | | | | | | The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value. An example: call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2) Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90788 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to emit debug info for virtual functions and virtual base classes.Devang Patel2009-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90474 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utility routine to create subprogram definition entry from subprogram ↵Devang Patel2009-12-01
| | | | | | declaration entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90282 91177308-0d34-0410-b5e6-96231b3b80d8
* Use StringRef (again) in DebugInfo interface.Devang Patel2009-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89866 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit pubtypes.Devang Patel2009-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89725 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CreateLocation varinat that accepts MDNode (with a default value).Devang Patel2009-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89689 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Devang Patel2009-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89156 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r87059 for now. It is failing clang tests.Devang Patel2009-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87070 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary llvm.dbg.declare bitcastVictor Hernandez2009-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87059 91177308-0d34-0410-b5e6-96231b3b80d8
* "Attach debug info with llvm instructions" mode was enabled a month ago. Now ↵Devang Patel2009-11-12
| | | | | | make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87014 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use StringRef in DebugInfo interface. Devang Patel2009-11-12
| | | | | | | | This allows StringRef to skip controversial if(str) check in constructor. Buildbots, wait for corresponding clang and llvm-gcc FE check-ins! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86914 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support to debug inlined functions.Devang Patel2009-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86748 91177308-0d34-0410-b5e6-96231b3b80d8
* Process InlinedAt location info.Devang Patel2009-11-10
| | | | | | | Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86727 91177308-0d34-0410-b5e6-96231b3b80d8
* Tolerate invalid derived type.Devang Patel2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86269 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not bother to emit debug info for nameless global variable.Devang Patel2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8
* While calculating original type size for a derived type, handle type ↵Devang Patel2009-11-04
| | | | | | | | | variants encoded as DIDerivedType appropriately. This improves bitfield support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86073 91177308-0d34-0410-b5e6-96231b3b80d8
* If string field is empty then return NULL.Devang Patel2009-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85630 91177308-0d34-0410-b5e6-96231b3b80d8
* If a type is derived from a derived type then calculate size appropriately.Devang Patel2009-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85619 91177308-0d34-0410-b5e6-96231b3b80d8
* First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses ↵Devang Patel2009-10-29
| | | | | | | | | until one find's dbg.declare intrinsic. Patch by Sunae Seo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85518 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to encode type info using llvm::Constant.Devang Patel2009-10-26
| | | | | | | Patch by Talin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85126 91177308-0d34-0410-b5e6-96231b3b80d8
* "there is not any instruction with attached debug info in this module" does ↵Devang Patel2009-10-13
| | | | | | not mean "there is no debug info in this module". :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83984 91177308-0d34-0410-b5e6-96231b3b80d8
* It's possible for a global variable to be optimized out of a metadata object. SoBill Wendling2009-10-08
| | | | | | | we should allow a "null" with this dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83573 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract subprogram and compile unit information from the debug info attached ↵Devang Patel2009-10-07
| | | | | | to an instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83491 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand api out in the usual inserter way, though, I do have aMike Stump2009-10-01
| | | | | | | | question, can we get rid of the BasicBlock versions of all inserters and use Head == 0 to indicate the old case when GetInsertBlock == 0? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83216 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another MDNode into DebugLocTuple. This will be used to keep track of ↵Devang Patel2009-10-01
| | | | | | inlined functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83190 91177308-0d34-0410-b5e6-96231b3b80d8