aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-05-19 01:36:37 +0000
committerEric Christopher <echristo@apple.com>2012-05-19 01:36:37 +0000
commit791e629deef7e4a410e67527da26405916415d3a (patch)
tree296a316189f7bef998434b6c3a22b945d4fb75ba /lib/Analysis
parent75f89b54b588521e9e5aac113e3c4f7088bb6106 (diff)
downloadexternal_llvm-791e629deef7e4a410e67527da26405916415d3a.zip
external_llvm-791e629deef7e4a410e67527da26405916415d3a.tar.gz
external_llvm-791e629deef7e4a410e67527da26405916415d3a.tar.bz2
Actually support DW_TAG_rvalue_reference_type that we were trying
to generate out of the front end. rdar://11479676 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DIBuilder.cpp7
-rw-r--r--lib/Analysis/DebugInfo.cpp16
2 files changed, 14 insertions, 9 deletions
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp
index d982833..0e7d540 100644
--- a/lib/Analysis/DIBuilder.cpp
+++ b/lib/Analysis/DIBuilder.cpp
@@ -229,12 +229,13 @@ DIType DIBuilder::createPointerType(DIType PointeeTy, uint64_t SizeInBits,
return DIType(MDNode::get(VMContext, Elts));
}
-/// createReferenceType - Create debugging information entry for a reference.
-DIType DIBuilder::createReferenceType(DIType RTy) {
+/// createReferenceType - Create debugging information entry for a reference
+/// type.
+DIType DIBuilder::createReferenceType(unsigned Tag, DIType RTy) {
assert(RTy.Verify() && "Unable to create reference type");
// References are encoded in DIDerivedType format.
Value *Elts[] = {
- GetTagConstant(VMContext, dwarf::DW_TAG_reference_type),
+ GetTagConstant(VMContext, Tag),
NULL, // TheCU,
NULL, // Name
NULL, // Filename
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index f61a8f3..194aed8 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -150,6 +150,7 @@ bool DIDescriptor::isDerivedType() const {
case dwarf::DW_TAG_typedef:
case dwarf::DW_TAG_pointer_type:
case dwarf::DW_TAG_reference_type:
+ case dwarf::DW_TAG_rvalue_reference_type:
case dwarf::DW_TAG_const_type:
case dwarf::DW_TAG_volatile_type:
case dwarf::DW_TAG_restrict_type:
@@ -399,11 +400,13 @@ bool DIType::Verify() const {
unsigned Tag = getTag();
if (!isBasicType() && Tag != dwarf::DW_TAG_const_type &&
Tag != dwarf::DW_TAG_volatile_type && Tag != dwarf::DW_TAG_pointer_type &&
- Tag != dwarf::DW_TAG_reference_type && Tag != dwarf::DW_TAG_restrict_type
- && Tag != dwarf::DW_TAG_vector_type && Tag != dwarf::DW_TAG_array_type
- && Tag != dwarf::DW_TAG_enumeration_type
- && Tag != dwarf::DW_TAG_subroutine_type
- && getFilename().empty())
+ Tag != dwarf::DW_TAG_reference_type &&
+ Tag != dwarf::DW_TAG_rvalue_reference_type &&
+ Tag != dwarf::DW_TAG_restrict_type && Tag != dwarf::DW_TAG_vector_type &&
+ Tag != dwarf::DW_TAG_array_type &&
+ Tag != dwarf::DW_TAG_enumeration_type &&
+ Tag != dwarf::DW_TAG_subroutine_type &&
+ getFilename().empty())
return false;
return true;
}
@@ -512,7 +515,8 @@ uint64_t DIDerivedType::getOriginalTypeSize() const {
// it's a reference then it's just the size of the field. Pointer types
// have no need of this since they're a different type of qualification
// on the type.
- if (BaseType.getTag() == dwarf::DW_TAG_reference_type)
+ if (BaseType.getTag() == dwarf::DW_TAG_reference_type ||
+ BaseType.getTag() == dwarf::DW_TAG_rvalue_reference_type)
return getSizeInBits();
else if (BaseType.isDerivedType())
return DIDerivedType(BaseType).getOriginalTypeSize();