diff options
author | Eric Christopher <echristo@apple.com> | 2012-01-11 00:01:29 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-01-11 00:01:29 +0000 |
commit | dcc296d420d064e4cedfc80abc8df6bfb0b35b03 (patch) | |
tree | bd898c37ac993016ba1143cc42ef674b766d7e36 /lib/Analysis/DebugInfo.cpp | |
parent | eab30279f7017db1bcbe38991b367d86862643ad (diff) |
Don't avoid recursing for pointer types, just reference types. Expand on
the comment.
Fixes constvars.exp on the gdb test builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 50080592a3..f925b5ca43 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -492,9 +492,10 @@ uint64_t DIDerivedType::getOriginalTypeSize() const { if (!BaseType.isValid()) return getSizeInBits(); // If this is a derived type, go ahead and get the base type, unless - // it's a reference or pointer type, then it's just the size of the field. - if (BaseType.getTag() == dwarf::DW_TAG_reference_type || - BaseType.getTag() == dwarf::DW_TAG_pointer_type) + // it's a reference then it's just the size of the field. Pointer types + // have no need of this since they're a different type of qualification + // on the type. + if (BaseType.getTag() == dwarf::DW_TAG_reference_type) return getSizeInBits(); else if (BaseType.isDerivedType()) return DIDerivedType(BaseType).getOriginalTypeSize(); |