aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-01-08 01:53:52 +0000
committerEric Christopher <echristo@gmail.com>2013-01-08 01:53:52 +0000
commit9a1e0e252a7ede548acaac98cf304d4bb135fb97 (patch)
treebe815bcf7ae2da8f89532360c40b0c6847331fa4 /lib
parent1f55eb4c5766fd6a6fa53c17f7bb9e7d4ea03500 (diff)
downloadexternal_llvm-9a1e0e252a7ede548acaac98cf304d4bb135fb97.zip
external_llvm-9a1e0e252a7ede548acaac98cf304d4bb135fb97.tar.gz
external_llvm-9a1e0e252a7ede548acaac98cf304d4bb135fb97.tar.bz2
Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp3
-rw-r--r--lib/IR/DIBuilder.cpp7
-rw-r--r--lib/IR/DebugInfo.cpp5
-rw-r--r--lib/Support/Dwarf.cpp1
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 372f98d..21cceaf 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -825,7 +825,6 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
Buffer.setTag(Tag);
switch (Tag) {
- case dwarf::DW_TAG_vector_type:
case dwarf::DW_TAG_array_type:
constructArrayTypeDIE(Buffer, &CTy);
break;
@@ -1347,7 +1346,7 @@ void CompileUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR,
void CompileUnit::constructArrayTypeDIE(DIE &Buffer,
DICompositeType *CTy) {
Buffer.setTag(dwarf::DW_TAG_array_type);
- if (CTy->getTag() == dwarf::DW_TAG_vector_type)
+ if (CTy->isVector())
addFlag(&Buffer, dwarf::DW_AT_GNU_vector);
// Emit derived type.
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index f9e5cab..bd7f0e3 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -616,9 +616,10 @@ DIType DIBuilder::createArrayType(uint64_t Size, uint64_t AlignInBits,
/// createVectorType - Create debugging information entry for a vector.
DIType DIBuilder::createVectorType(uint64_t Size, uint64_t AlignInBits,
DIType Ty, DIArray Subscripts) {
- // TAG_vector_type is encoded in DICompositeType format.
+
+ // A vector is an array type with the FlagVector flag applied.
Value *Elts[] = {
- GetTagConstant(VMContext, dwarf::DW_TAG_vector_type),
+ GetTagConstant(VMContext, dwarf::DW_TAG_array_type),
NULL, //TheCU,
MDString::get(VMContext, ""),
NULL, //TheCU,
@@ -626,7 +627,7 @@ DIType DIBuilder::createVectorType(uint64_t Size, uint64_t AlignInBits,
ConstantInt::get(Type::getInt64Ty(VMContext), Size),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
- ConstantInt::get(Type::getInt32Ty(VMContext), 0),
+ ConstantInt::get(Type::getInt32Ty(VMContext), DIType::FlagVector),
Ty,
Subscripts,
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index d288308..7083495 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -197,7 +197,6 @@ bool DIDescriptor::isCompositeType() const {
case dwarf::DW_TAG_structure_type:
case dwarf::DW_TAG_union_type:
case dwarf::DW_TAG_enumeration_type:
- case dwarf::DW_TAG_vector_type:
case dwarf::DW_TAG_subroutine_type:
case dwarf::DW_TAG_class_type:
return true;
@@ -426,7 +425,7 @@ bool DIType::Verify() const {
Tag != dwarf::DW_TAG_ptr_to_member_type &&
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_restrict_type &&
Tag != dwarf::DW_TAG_array_type &&
Tag != dwarf::DW_TAG_enumeration_type &&
Tag != dwarf::DW_TAG_subroutine_type &&
@@ -1100,6 +1099,8 @@ void DIType::printInternal(raw_ostream &OS) const {
if (isForwardDecl())
OS << " [fwd]";
+ if (isVector())
+ OS << " [vector]";
}
void DIDerivedType::printInternal(raw_ostream &OS) const {
diff --git a/lib/Support/Dwarf.cpp b/lib/Support/Dwarf.cpp
index 8a96048..615efb8 100644
--- a/lib/Support/Dwarf.cpp
+++ b/lib/Support/Dwarf.cpp
@@ -80,7 +80,6 @@ const char *llvm::dwarf::TagString(unsigned Tag) {
case DW_TAG_hi_user: return "DW_TAG_hi_user";
case DW_TAG_auto_variable: return "DW_TAG_auto_variable";
case DW_TAG_arg_variable: return "DW_TAG_arg_variable";
- case DW_TAG_vector_type: return "DW_TAG_vector_type";
case DW_TAG_rvalue_reference_type: return "DW_TAG_rvalue_reference_type";
case DW_TAG_template_alias: return "DW_TAG_template_alias";
case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";