aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-10-24 23:15:17 +0000
committerDevang Patel <dpatel@apple.com>2011-10-24 23:15:17 +0000
commit41422511e80e05d42bbf2d8460ca1b8b59db68ae (patch)
tree0fba4adb86a66441046ff423ceb6506abe38e94e /lib/CodeGen/CGDebugInfo.cpp
parent436c8898cd1c93c5bacd3fcc4ac586bc5cd77062 (diff)
Do not drop type qualifiers in -flimit-debug-info mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 2e1d12d8ce..4448153591 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -486,7 +486,13 @@ llvm::DIType CGDebugInfo::CreatePointeeType(QualType PointeeTy,
llvm::DIFile Unit) {
if (!CGM.getCodeGenOpts().LimitDebugInfo)
return getOrCreateType(PointeeTy, Unit);
-
+
+ // Limit debug info for the pointee type.
+
+ // Handle qualifiers.
+ if (PointeeTy.hasLocalQualifiers())
+ return CreateQualifiedType(PointeeTy, Unit);
+
if (const RecordType *RTy = dyn_cast<RecordType>(PointeeTy)) {
RecordDecl *RD = RTy->getDecl();
llvm::DIFile DefUnit = getOrCreateFile(RD->getLocation());