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
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 5008059..f925b5c 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -492,9 +492,10 @@
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();