Devang Patel
4995bb0450
Start using DIFile. See updated SourceLevelDebugging.html for more information.
...
This patch updates LLVMDebugVersion to 8.
Debug info descriptors encoded using LLVMDebugVersion 7 is supported.
Corresponding llvmgcc and clang FE commits are required.
llvm-svn: 98020
2010-03-09 00:44:10 +00:00
Devang Patel
a7387f4ecc
Introduce DIFile. This will be used to represent header files and source file(s) in debug info.
...
llvm-svn: 97994
2010-03-08 22:27:22 +00:00
Devang Patel
ea239f6e0a
Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.
...
llvm-svn: 97990
2010-03-08 22:02:50 +00:00
Devang Patel
21633192f3
Remove DbgNode checks in constructor. Debug descriptors are intended to be light weight wrappers.
...
llvm-svn: 97988
2010-03-08 21:32:10 +00:00
Devang Patel
176dc29a62
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating checks in Descriptor constructors.
llvm-svn: 97975
2010-03-08 20:52:55 +00:00
Devang Patel
a716e313d6
Revert r97947.
...
llvm-svn: 97963
2010-03-08 19:20:38 +00:00
Devang Patel
1527b2657b
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.
llvm-svn: 97947
2010-03-08 18:25:48 +00:00
Devang Patel
bebe8e55dc
Use line and column number to distinguish two lexical blocks at the same level.
...
llvm-svn: 96395
2010-02-16 21:39:34 +00:00
Devang Patel
102b8a3103
Set DW_AT_artificial only if argument is marked as artificial.
...
llvm-svn: 95461
2010-02-06 01:02:37 +00:00
Devang Patel
83d905f82b
Provide interface to identifiy artificial methods.
...
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Devang Patel
c91ba40a59
Before inserting llvm.dbg.declare intrinsic at the end of a basic block, check whether the basic block has a terminator or not.
...
This API is used by clang and the test case is test/CodeGen/debug-info-crash.c in clang module.
llvm-svn: 94820
2010-01-29 18:30:57 +00:00
Devang Patel
9e6549db1d
Add extra element to composite type. This new element will be used to record c++ class that holds current class's vtable.
...
llvm-svn: 94586
2010-01-26 21:14:59 +00:00
Victor Hernandez
648015f3a6
Assert when debug intrinsic insert functions are passed empty arguments
...
llvm-svn: 94491
2010-01-26 02:07:38 +00:00
Devang Patel
280d341d36
Avoid using "Type" as the variable name.
...
llvm-svn: 94262
2010-01-23 00:26:28 +00:00
Victor Hernandez
f61bd354ef
Make sure ValueFn starts off empty
...
llvm-svn: 94256
2010-01-23 00:03:28 +00:00
Victor Hernandez
b8ad556b09
Avoid unnecessary Elts array
...
llvm-svn: 93978
2010-01-20 05:44:11 +00:00
Victor Hernandez
afaac26fea
Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
...
llvm-svn: 93764
2010-01-18 20:42:09 +00:00
Devang Patel
3bbca51dcd
Replace DebugLocTuple with DILocation.
...
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Victor Hernandez
c1b5223e76
Improve llvm.dbg.declare intrinsic by referring directly to the storage in 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.
llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Victor Hernandez
97d7107d5e
Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
...
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Victor Hernandez
aee71b4e81
Improve llvm.dbg.declare intrinsic by referring directly to the storage in 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.
llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Victor Hernandez
832bd4fd2d
Respond to Chris' review:
...
Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t.
Get constness correct for getVariable() and getValue().
llvm-svn: 93149
2010-01-11 07:45:19 +00:00
Benjamin Kramer
c233521d45
Convert a ton of simple integer type equality tests to the new predicate.
...
llvm-svn: 92760
2010-01-05 20:07:06 +00:00
Devang Patel
3b08c33f33
Remove dead debug info intrinsics.
...
Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start
AutoUpgrade simply ignores these intrinsics now.
llvm-svn: 92557
2010-01-05 01:10:40 +00:00
Chris Lattner
ecba817b0e
fix Analysis/DebugInfo.h to not include Metadata.h. Do this
...
by moving one method out of line and eliminating redundant checks
from other methods.
llvm-svn: 92337
2009-12-31 03:02:08 +00:00
Chris Lattner
c12382b7c8
rename "elements" of metadata to "operands". "Elements" are
...
things that occur in types. "operands" are things that occur
in values.
llvm-svn: 92322
2009-12-31 01:22:29 +00:00
Chris Lattner
9afb6e9c27
Optimize MDNode to coallocate the operand list immediately
...
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.
llvm-svn: 92321
2009-12-31 01:05:46 +00:00
Chris Lattner
d981b3fc91
remove a bunch of unneeded functions.
...
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner
430379c2d5
major cleanups, much of this file was incorrectly indented.
...
llvm-svn: 92262
2009-12-29 09:22:47 +00:00
Chris Lattner
f0034478f8
one pass of cleanup over DebugInfo.h. Much more is still needed.
...
llvm-svn: 92261
2009-12-29 09:15:46 +00:00
Chris Lattner
84e9de4a58
Final step in the metadata API restructuring: move the
...
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.
llvm-svn: 92259
2009-12-29 09:01:33 +00:00
Chris Lattner
9ec640a902
This is a major cleanup of the instruction metadata interfaces that
...
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.
llvm-svn: 92235
2009-12-28 23:41:32 +00:00
Chris Lattner
cd3aa9d1ff
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
...
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.
llvm-svn: 92225
2009-12-28 20:45:51 +00:00
David Greene
bcfb683e76
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92032
2009-12-23 19:45:49 +00:00
Devang Patel
ffb33d1df8
Add support to emit debug info for C++ namespaces.
...
llvm-svn: 91440
2009-12-15 19:16:48 +00:00
Devang Patel
11874672da
Revert 90858 90875 and 90805 for now.
...
llvm-svn: 90898
2009-12-08 23:21:45 +00:00
Victor Hernandez
f5143485fa
Rename DIFactory::InsertValue() as DIFactory::InsertDbgValueIntrinsic()
...
llvm-svn: 90807
2009-12-07 21:54:43 +00:00
Devang Patel
e59f4f7204
Add support to emit debug info for c++ style namespaces.
...
llvm-svn: 90805
2009-12-07 21:41:32 +00:00
Victor Hernandez
2a16652946
Introduce the "@llvm.dbg.value" debug intrinsic.
...
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.
llvm-svn: 90788
2009-12-07 19:36:34 +00:00
Devang Patel
fe7cf074f0
Add support to emit debug info for virtual functions and virtual base classes.
...
llvm-svn: 90474
2009-12-03 19:11:07 +00:00
Devang Patel
122acaf238
Add utility routine to create subprogram definition entry from subprogram declaration entry.
...
llvm-svn: 90282
2009-12-01 23:09:02 +00:00
Devang Patel
d50fc13c19
Use StringRef (again) in DebugInfo interface.
...
llvm-svn: 89866
2009-11-25 17:36:49 +00:00
Devang Patel
11c5d09a35
Emit pubtypes.
...
llvm-svn: 89725
2009-11-24 01:14:22 +00:00
Devang Patel
80eee0d8a4
Add CreateLocation varinat that accepts MDNode (with a default value).
...
llvm-svn: 89689
2009-11-23 19:11:20 +00:00
Devang Patel
34b8b72944
Remove dead code.
...
llvm-svn: 89156
2009-11-17 22:39:08 +00:00
Devang Patel
3e2aba2402
Revert r87059 for now. It is failing clang tests.
...
llvm-svn: 87070
2009-11-13 02:27:33 +00:00
Victor Hernandez
0be9d07279
Remove unnecessary llvm.dbg.declare bitcast
...
llvm-svn: 87059
2009-11-13 01:44:55 +00:00
Devang Patel
c024e96ca3
"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes.
...
llvm-svn: 87014
2009-11-12 19:02:56 +00:00
Devang Patel
c70b8eefb7
Do not use StringRef in DebugInfo interface.
...
This allows StringRef to skip controversial if(str) check in constructor.
Buildbots, wait for corresponding clang and llvm-gcc FE check-ins!
llvm-svn: 86914
2009-11-12 00:50:58 +00:00
Devang Patel
5c983cb2ab
Implement support to debug inlined functions.
...
llvm-svn: 86748
2009-11-10 23:06:00 +00:00