Do not drop type qualifiers in -flimit-debug-info mode.

llvm-svn: 142873
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2e1d12d8..4448153 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -486,7 +486,13 @@
                                             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());