forked from OSchip/llvm-project
Do not try calculate the size of forward-declared template type array.
llvm-svn: 128725
This commit is contained in:
parent
e625ba46b7
commit
1ffe23464a
|
@ -1226,6 +1226,14 @@ llvm::DIType CGDebugInfo::CreateType(const ArrayType *Ty,
|
||||||
} else if (Ty->isIncompleteArrayType()) {
|
} else if (Ty->isIncompleteArrayType()) {
|
||||||
Size = 0;
|
Size = 0;
|
||||||
Align = CGM.getContext().getTypeAlign(Ty->getElementType());
|
Align = CGM.getContext().getTypeAlign(Ty->getElementType());
|
||||||
|
} else if (Ty->isDependentSizedArrayType()) {
|
||||||
|
Size = 0;
|
||||||
|
Align = 0;
|
||||||
|
} else if (Ty->getElementType()->getTypeClass()
|
||||||
|
== Type::TemplateSpecialization) {
|
||||||
|
// FIXME : Emit appropriate element type info.
|
||||||
|
Size = 0;
|
||||||
|
Align = 0;
|
||||||
} else {
|
} else {
|
||||||
// Size and align of the whole array, not the element type.
|
// Size and align of the whole array, not the element type.
|
||||||
Size = CGM.getContext().getTypeSize(Ty);
|
Size = CGM.getContext().getTypeSize(Ty);
|
||||||
|
|
|
@ -20,3 +20,13 @@ class TU {
|
||||||
};
|
};
|
||||||
|
|
||||||
TU<2> u2;
|
TU<2> u2;
|
||||||
|
|
||||||
|
// PR9600
|
||||||
|
template<typename T> class vector {};
|
||||||
|
class Foo;
|
||||||
|
typedef vector<Foo*> FooVector[3];
|
||||||
|
struct Test {
|
||||||
|
virtual void foo(FooVector *);
|
||||||
|
};
|
||||||
|
static Test test;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue