Author: dblaikie
Date: Sat Jan 5 14:03:07 2013
New Revision: 171633
URL: http://llvm.org/viewvc/llvm-project?rev=171633&view=rev
Log:
PR14573: Unnamed parameters in debug info, Part 2
Catch some cases I'd missed in r171605 related to unnamed parameters of record
type. This resolves all remaining cases of PR14573 suppression in the GDB 7.5
test suite. Fix to the test suite to follow.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/test/CodeGenCXX/debug-info-method.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=171633&r1=171632&r2=171633&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Sat Jan 5 14:03:07 2013
@@ -2432,7 +2432,7 @@
// If VD is an anonymous union then Storage represents value for
// all union fields.
const RecordDecl *RD = cast<RecordDecl>(RT->getDecl());
- if (RD->isUnion()) {
+ if (RD->isUnion() && RD->isAnonymousStructOrUnion()) {
for (RecordDecl::field_iterator I = RD->field_begin(),
E = RD->field_end();
I != E; ++I) {
@@ -2456,8 +2456,8 @@
DBuilder.insertDeclare(Storage, D, Builder.GetInsertBlock());
Call->setDebugLoc(llvm::DebugLoc::get(Line, Column, Scope));
}
+ return;
}
- return;
}
// Create the descriptor for the variable.
Modified: cfe/trunk/test/CodeGenCXX/debug-info-method.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-method.cpp?rev=171633&r1=171632&r2=171633&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-method.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-method.cpp Sat Jan 5 14:03:07 2013
@@ -1,12 +1,19 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
-// CHECK: metadata !"_ZN1A3fooEi", {{.*}}, i32 258
+// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
+// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}}, i32 258
// CHECK: ""{{.*}}DW_TAG_arg_variable
+// CHECK: ""{{.*}}DW_TAG_arg_variable
+// CHECK: ""{{.*}}DW_TAG_arg_variable
+union {
+ int a;
+ float b;
+} u;
+
class A {
protected:
- void foo(int);
+ void foo(int, A, decltype(u));
};
-void A::foo(int) {
+void A::foo(int, A, decltype(u)) {
}
A a;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits