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 | 43a11829754cbc09c34b81a9ebd48e3bc5956a1b (patch) | |
tree | 9f790d27fd1240299857c61102b0c8445a1b8fc9 /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 258d7b4182e2900679b0bf132e2bd03d487aba61 (diff) | |
download | bcm5719-llvm-43a11829754cbc09c34b81a9ebd48e3bc5956a1b.tar.gz bcm5719-llvm-43a11829754cbc09c34b81a9ebd48e3bc5956a1b.zip |
Don't avoid recursing for pointer types, just reference types. Expand on
the comment.
Fixes constvars.exp on the gdb test builder.
llvm-svn: 147897
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 50080592a3e..f925b5ca43a 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/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(); |