aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-04-27 22:40:36 +0000
committerDevang Patel <dpatel@apple.com>2009-04-27 22:40:36 +0000
commitde13502158c6577aaff251abff30999417dabfe1 (patch)
treeeb2d7f6c51fb2a82168078286ab542878357a306 /lib/CodeGen/CGDebugInfo.cpp
parentab41e63821dc60ad144d0684df8d79a9eef86b75 (diff)
While generating debug info ignore unnamed fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index eeaa197cf3..c8d3d634d3 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -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);