| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
of DIType.
Implement DIType::generateRef to return a type reference. This function will be
used in setContaintingType and in DIBuilder to generete the type reference.
No functionality change.
llvm-svn: 190188
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ptr_to_member.
We introduce a new class DITypeRef that represents a reference to a DIType.
It wraps around a Value*, which can be either an identifier in MDString
or an actual MDNode. The class has a helper function "resolve" that
finds the actual MDNode for a given DITypeRef.
We specialize getFieldAs to return a field that is a reference to a
DIType. To correctly access the base type field of ptr_to_member,
getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef.
Also add a typedef for DITypeIdentifierMap and a helper
generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep
a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually
populate the map.
Verifier is updated accordingly.
llvm-svn: 190081
|
|
|
|
| |
llvm-svn: 189513
|
|
|
|
|
|
| |
Code review feedback from Eric Christopher.
llvm-svn: 189512
|
|
|
|
|
|
|
|
|
| |
template arguments
With the added debug assertions this fix is covered by existing Clang
tests. (& found some other issues, also fixed)
llvm-svn: 189495
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DICompositeType will have an identifier field at position 14. For now, the
field is set to null in DIBuilder.
For DICompositeTypes where the template argument field (the 13th field)
was optional, modify DIBuilder to make sure the template argument field is set.
Now DICompositeType has 15 fields.
Update DIBuilder to use NULL instead of "i32 0" for null value of a MDNode.
Update verifier to check that DICompositeType has 15 fields and the last
field is null or a MDString.
Update testing cases to include an extra field for DICompositeType.
The identifier field will be used by type uniquing so a front end can
genearte a DICompositeType with a unique identifer.
llvm-svn: 189282
|
|
|
|
| |
llvm-svn: 189158
|
|
|
|
| |
llvm-svn: 189131
|
|
|
|
|
|
|
|
| |
record type after construction
Plus a type cleanup & minor fix to enumerate members of declarations.
llvm-svn: 188577
|
|
|
|
|
|
|
|
|
|
| |
constructed
This is necessary to allow Clang to only emit implicit members when
there is code generated for them, rather than whenever they are ODR
used.
llvm-svn: 188082
|
|
|
|
|
|
|
|
|
|
|
|
| |
the type exists.
Fix up cases where we weren't checking for optional types and add
an assert to addType to make sure we catch this in the future.
Fix up a testcase that was using the tag for DW_TAG_array_type
when it meant DW_TAG_enumeration_type.
llvm-svn: 187963
|
|
|
|
| |
llvm-svn: 187953
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.
Current state of Finder:
DebugInfoFinder tries to list all debug info MDNodes used in a module. To
list debug info MDNodes used by an instruction, DebugInfoFinder provides
processDeclare, processValue and processLocation to handle DbgDeclareInst,
DbgValueInst and DbgLoc attached to instructions. processModule will go
through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
used by the CUs.
TODO:
1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
need to add a list of variables that are used by DbgDeclareInst and
DbgValueInst.
2> MDString fields should be null or isa<MDString> and MDNode fields should be
null or isa<MDNode>. We currently use empty string or int 0 to represent null.
3> Go though Verify functions and make sure that they check field types.
4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
testing case has a llvm.dbg.cu.
Re-apply r187609 with fix to pass ocaml binding. vmcore.ml generates a debug
location with scope being metadata !{}, in verifier we treat this as a null
scope.
llvm-svn: 187812
|
|
|
|
|
|
|
|
| |
instructions." in an attempt to bring back some bots.
This reverts commit r187609.
llvm-svn: 187638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.
Current state of Finder:
DebugInfoFinder tries to list all debug info MDNodes used in a module. To
list debug info MDNodes used by an instruction, DebugInfoFinder provides
processDeclare, processValue and processLocation to handle DbgDeclareInst,
DbgValueInst and DbgLoc attached to instructions. processModule will go
through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
used by the CUs.
TODO:
1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
need to add a list of variables that are used by DbgDeclareInst and
DbgValueInst.
2> MDString fields should be null or isa<MDString> and MDNode fields should be
null or isa<MDNode>. We currently use empty string or int 0 to represent null.
3> Go though Verify functions and make sure that they check field types.
4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
testing case has a llvm.dbg.cu.
llvm-svn: 187609
|
|
|
|
|
|
|
|
| |
Also always add DIType, DISubprogram and DIGlobalVariable to the list
in DebugInfoFinder without checking them, so we can verify them later
on.
llvm-svn: 187285
|
|
|
|
| |
llvm-svn: 187247
|
|
|
|
|
|
|
|
| |
We used to call Verify before adding DICompileUnit to the list, and now we
remove the check and always add DICompileUnit to the list in DebugInfoFinder,
so we can verify them later on.
llvm-svn: 187237
|
|
|
|
| |
llvm-svn: 187224
|
|
|
|
| |
llvm-svn: 187212
|
|
|
|
| |
llvm-svn: 187157
|
|
|
|
|
|
|
| |
Make sure the context field of DIType is MDNode.
Fix testing cases to make them pass the verifier.
llvm-svn: 187150
|
|
|
|
|
|
|
|
| |
Make sure the context and type fields are MDNodes. We will generate
verification errors if those fields are non-empty strings.
Fix testing cases to make them pass the verifier.
llvm-svn: 187106
|
|
|
|
|
|
|
| |
Improve the Finder to handle context of a DIVariable used by DbgValueInst.
Fix testing cases to make them pass the verifier.
llvm-svn: 187052
|
|
|
|
|
|
| |
to assume we're replacing. Clarify comments.
llvm-svn: 187018
|
|
|
|
| |
llvm-svn: 187017
|
|
|
|
|
|
|
| |
all enumerated cases. Reformat the rest of the existing constructors to
match.
llvm-svn: 187015
|
|
|
|
|
|
|
| |
Move to a single constructor with a default argument and avoid
the check and nullification.
llvm-svn: 187014
|
|
|
|
| |
llvm-svn: 187013
|
|
|
|
| |
llvm-svn: 187012
|
|
|
|
|
|
|
| |
Improve the Finder to handle context of a DIVariable.
If Scope is a DICompileUnit, add it to the list of CUs.
llvm-svn: 187003
|
|
|
|
| |
llvm-svn: 187002
|
|
|
|
| |
llvm-svn: 187001
|
|
|
|
|
|
|
| |
Use getNodeField to access a field as a MDNode.
No functionality change.
llvm-svn: 186985
|
|
|
|
| |
llvm-svn: 186972
|
|
|
|
|
|
|
|
|
|
|
| |
MDNodes used by DbgDeclareInst and DbgValueInst.
Another 16 testing cases failed and they are disabled with
-disable-debug-info-verifier.
A total of 34 cases are disabled with -disable-debug-info-verifier and will be
corrected.
llvm-svn: 186902
|
|
|
|
|
|
| |
Instead of just adding the scope to the list, we actually handle the scope.
llvm-svn: 186867
|
|
|
|
|
|
|
|
| |
Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.
llvm-svn: 186737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1> Use DebugInfoFinder to find debug info MDNodes.
2> Add disable-debug-info-verifier to disable verifying debug info.
3> Disable verifying for testing cases that fail (will update the testing cases
later on).
4> MDNodes generated by clang can have empty filename for TAG_inheritance and
TAG_friend, so DIType::Verify is modified accordingly.
Note that DebugInfoFinder does not list all debug info MDNode.
For example, clang can generate:
metadata !{i32 786468}, which will fail to verify.
This MDNode is used by debug info but not included in DebugInfoFinder.
This MDNode is generated as a temporary node in DIBuilder::createFunction
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
MDNode::getTemporary(VMContext, TElts)
llvm-svn: 186634
|
|
|
|
|
|
|
| |
This reverts commit r185876 as the functions appear to still be used
by dragonegg.
llvm-svn: 185890
|
|
|
|
| |
llvm-svn: 185876
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were being a bit too aggresive here in classifying global variables
with no global reference or constant value to be invalid - this would
cause LLVM to not emit the DWARF description of the global variable if
it had been optimized away, which isn't helpful for users who might
benefit from the global variable's description even if there's no
location information.
This also fixes a crasher issue here that I was unable to reduce a test
case for - involving a using decl (& subsequent
DW_TAG_imported_declaration ) of such a global variable that, once
optimized away, would crash when an attempt to emit the imported
declaration was made.
llvm-svn: 185675
|
|
|
|
|
|
| |
No functionality change. Remove handling for the null case.
llvm-svn: 185354
|
|
|
|
|
|
|
|
|
| |
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.
llvm-svn: 185249
|
|
|
|
|
|
| |
and parameter packs
llvm-svn: 184643
|
|
|
|
|
|
|
|
|
| |
definitions (& rename the 'fwd' tag to 'decl' for clarity)
This change is version locked with a change in Clang, so expect some
transient buildbot fallout.
llvm-svn: 184525
|
|
|
|
|
|
| |
Also simplify code a bit while there. No functionality change.
llvm-svn: 183076
|
|
|
|
| |
llvm-svn: 182869
|
|
|
|
|
|
|
|
|
| |
This resolves the last of the PR14606 failures in the GDB 7.5 test
suite by implementing an optional name field for
DW_TAG_imported_modules/DIImportedEntities and using that to implement
C++ namespace aliases (eg: "namespace X = Y;").
llvm-svn: 182328
|
|
|
|
|
|
|
|
|
|
| |
parameters.
This is only tested for global variables at the moment (& includes tests
for the unnamed parameter case, since apparently this entire function
was completely untested previously)
llvm-svn: 181632
|