r188962 - DebugInfo: Require only the declaration of types only used as parameter and return types

David Blaikie dblaikie at gmail.com
Wed Aug 21 16:23:08 PDT 2013


Author: dblaikie
Date: Wed Aug 21 18:23:07 2013
New Revision: 188962

URL: http://llvm.org/viewvc/llvm-project?rev=188962&view=rev
Log:
DebugInfo: Require only the declaration of types only used as parameter and return types

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-limited.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=188962&r1=188961&r2=188962&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Aug 21 18:23:07 2013
@@ -769,7 +769,7 @@ llvm::DIType CGDebugInfo::CreateType(con
   SmallVector<llvm::Value *, 16> EltTys;
 
   // Add the result type at least.
-  EltTys.push_back(getOrCreateType(Ty->getResultType(), Unit));
+  EltTys.push_back(getOrCreateType(Ty->getResultType(), Unit, true));
 
   // Set up remainder of arguments if there is a prototype.
   // FIXME: IF NOT, HOW IS THIS REPRESENTED?  llvm-gcc doesn't represent '...'!
@@ -777,7 +777,7 @@ llvm::DIType CGDebugInfo::CreateType(con
     EltTys.push_back(DBuilder.createUnspecifiedParameter());
   else if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(Ty)) {
     for (unsigned i = 0, e = FPT->getNumArgs(); i != e; ++i)
-      EltTys.push_back(getOrCreateType(FPT->getArgType(i), Unit));
+      EltTys.push_back(getOrCreateType(FPT->getArgType(i), Unit, true));
   }
 
   llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(EltTys);

Modified: cfe/trunk/test/CodeGenCXX/debug-info-limited.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-limited.cpp?rev=188962&r1=188961&r2=188962&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-limited.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-limited.cpp Wed Aug 21 18:23:07 2013
@@ -24,3 +24,10 @@ int baz(B *b) {
   return bar(b);
 }
 
+
+// CHECK: ; [ DW_TAG_structure_type ] [C] {{.*}} [decl]
+
+struct C {
+};
+
+C (*x)(C);





More information about the cfe-commits mailing list