aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 478f862775..08cd129b63 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -363,6 +363,7 @@ CGDebugInfo::getOrCreateFunctionType(QualType type, llvm::CompileUnitDesc *Unit)
for (unsigned int i =0; i < FTPro->getNumArgs(); i++) {
QualType ParamType = FTPro->getArgType(i);
ArgTy = getOrCreateType(ParamType, Unit);
+ // FIXME: Remove once we support all types.
if (ArgTy) Elements.push_back(ArgTy);
}
}
@@ -407,8 +408,11 @@ void CGDebugInfo::getOrCreateRecordType(QualType type,
for (int i = 0; i < NumMembers; i++) {
FieldDecl *Member = RecDecl->getMember(i);
llvm::TypeDesc *MemberTy = getOrCreateType(Member->getType(), Unit);
- MemberTy->setOffset(RL.getFieldOffset(i));
- Elements.push_back(MemberTy);
+ // FIXME: Remove once we support all types.
+ if (MemberTy) {
+ MemberTy->setOffset(RL.getFieldOffset(i));
+ Elements.push_back(MemberTy);
+ }
}
// Fill in the blanks.