While generating debug info ignore unnamed fields.

llvm-svn: 70266
This commit is contained in:
Devang Patel 2009-04-27 22:40:36 +00:00
parent 7b71e63120
commit df348f10b6
1 changed files with 8 additions and 0 deletions

View File

@ -304,6 +304,10 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty,
std::string FieldName = Field->getNameAsString();
// Ignore unnamed fields.
if (FieldName.empty())
continue;
// Get the location for the field.
SourceLocation FieldDefLoc = Field->getLocation();
llvm::DICompileUnit FieldDefUnit = getOrCreateCompileUnit(FieldDefLoc);
@ -414,6 +418,10 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
std::string FieldName = Field->getNameAsString();
// Ignore unnamed fields.
if (FieldName.empty())
continue;
// Get the location for the field.
SourceLocation FieldDefLoc = Field->getLocation();
llvm::DICompileUnit FieldDefUnit = getOrCreateCompileUnit(FieldDefLoc);