summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit242ce91ecc84c84879b7db8ae857cc07377c3200 (patch)
tree86b190b3d662f327f37cedf7d2c142d08c31dc0b /clang/lib/CodeGen
parent733237db23ecf0ec3487caf960b88bdc49b76bc9 (diff)
downloadbcm5719-llvm-242ce91ecc84c84879b7db8ae857cc07377c3200.tar.gz
bcm5719-llvm-242ce91ecc84c84879b7db8ae857cc07377c3200.zip
Do not drop type qualifiers in -flimit-debug-info mode.
llvm-svn: 142873
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2e1d12d8ce8..4448153591f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud