Merge branch 'master' into nvptx_merge

This commit is contained in:
evghenii
2014-07-07 16:30:12 +02:00
29 changed files with 397 additions and 231 deletions

View File

@@ -826,7 +826,7 @@ EnumType::GetDIType(llvm::DIDescriptor scope) const {
llvm::DIFile diFile = pos.GetDIFile();
llvm::DIType diType =
m->diBuilder->createEnumerationType(scope, name, diFile, pos.first_line,
m->diBuilder->createEnumerationType(diFile, name, diFile, pos.first_line,
32 /* size in bits */,
32 /* align in bits */,
elementArray
@@ -1956,6 +1956,25 @@ StructType::IsConstType() const {
}
bool
StructType::IsDefined() const {
for (int i = 0; i < GetElementCount(); i++) {
const Type *t = GetElementType(i);
const UndefinedStructType *ust = CastType<UndefinedStructType>(t);
if (ust != NULL) {
return false;
}
const StructType *st = CastType<StructType>(t);
if (st != NULL) {
if (!st->IsDefined()) {
return false;
}
}
}
return true;
}
const Type *
StructType::GetBaseType() const {
return this;
@@ -2179,7 +2198,7 @@ StructType::GetDIType(llvm::DIDescriptor scope) const {
llvm::DIArray elements = m->diBuilder->getOrCreateArray(elementLLVMTypes);
llvm::DIFile diFile = pos.GetDIFile();
return m->diBuilder->createStructType(
scope,
diFile,
name,
diFile,
pos.first_line, // Line number
@@ -2422,7 +2441,7 @@ UndefinedStructType::GetDIType(llvm::DIDescriptor scope) const {
llvm::DIFile diFile = pos.GetDIFile();
llvm::DIArray elements;
return m->diBuilder->createStructType(
scope,
diFile,
name,
diFile,
pos.first_line, // Line number