Looks good. Thanks! -eric
On Tue, Feb 25, 2014 at 3:42 PM, Adrian Prantl <[email protected]> wrote: > Author: adrian > Date: Tue Feb 25 17:42:18 2014 > New Revision: 202208 > > URL: http://llvm.org/viewvc/llvm-project?rev=202208&view=rev > Log: > Address review comments for r202185, no functionality changes. > > Modified: > cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp > > Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=202208&r1=202207&r2=202208&view=diff > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Feb 25 17:42:18 2014 > @@ -759,7 +759,7 @@ llvm::DIType CGDebugInfo::CreateType(con > EltTys.push_back(getOrCreateType(Ty->getReturnType(), Unit)); > > // Set up remainder of arguments if there is a prototype. > - // FIXME: IF NOT, HOW IS THIS REPRESENTED? llvm-gcc doesn't represent > '...'! > + // otherwise emit it as a variadic function. > if (isa<FunctionNoProtoType>(Ty)) > EltTys.push_back(DBuilder.createUnspecifiedParameter()); > else if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(Ty)) { > @@ -2440,7 +2440,8 @@ llvm::DICompositeType CGDebugInfo::getOr > return DBuilder.createSubroutineType(F, EltTypeArray); > } > > - // Variadic function. > + // Handle variadic function types; they need an additional > + // unspecified parameter. > if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) > if (FD->isVariadic()) { > SmallVector<llvm::Value *, 16> EltTys; > > Modified: cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp?rev=202208&r1=202207&r2=202208&view=diff > ============================================================================== > --- cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp (original) > +++ cfe/trunk/test/CodeGenCXX/debug-info-varargs.cpp Tue Feb 25 17:42:18 2014 > @@ -4,21 +4,19 @@ struct A > { > // CHECK-DAG: ", i32 [[@LINE+1]], metadata ![[ATY:[0-9]+]]{{.*}}[ > DW_TAG_subprogram ]{{.*}}[a] > void a(int c, ...) {} > - // CHECK-DAG: ![[ATY]] ={{.*}} metadata ![[AARGS:[0-9]+]], i32 0, null, > null, null} ; [ DW_TAG_subroutine_type ] > - // CHECK-DAG: ![[AARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]} > - // CHECK-DAG: ![[UNSPEC]] = metadata !{i32 786456} > + // CHECK: ![[ATY]] ={{.*}} metadata ![[AARGS:[0-9]+]], i32 0, null, null, > null} ; [ DW_TAG_subroutine_type ] > + // CHECK: ![[AARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]} > + // CHECK: ![[UNSPEC]] = {{.*}} [ DW_TAG_unspecified_parameters ] > }; > > - // CHECK-DAG: ", i32 [[@LINE+1]], metadata ![[BTY:[0-9]+]]{{.*}}[ > DW_TAG_subprogram ]{{.*}}[b] > + // CHECK: ", i32 [[@LINE+1]], metadata ![[BTY:[0-9]+]]{{.*}}[ > DW_TAG_subprogram ]{{.*}}[b] > void b(int c, ...) { > - // CHECK-DAG: ![[BTY]] ={{.*}} metadata ![[BARGS:[0-9]+]], i32 0, null, > null, null} ; [ DW_TAG_subroutine_type ] > - // CHECK-DAG: ![[BARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]} > + // CHECK: ![[BTY]] ={{.*}} metadata ![[BARGS:[0-9]+]], i32 0, null, null, > null} ; [ DW_TAG_subroutine_type ] > + // CHECK: ![[BARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]} > > A a; > > - // CHECK-DAG: metadata ![[PST:[0-9]+]], i32 0, i32 0} ; [ > DW_TAG_auto_variable ] [fptr] [line [[@LINE+1]]] > + // CHECK: metadata ![[PST:[0-9]+]], i32 0, i32 0} ; [ DW_TAG_auto_variable > ] [fptr] [line [[@LINE+1]]] > void (*fptr)(int, ...) = b; > - // CHECK-DAG: ![[PST]] ={{.*}} metadata ![[ST:[0-9]+]]} ; [ > DW_TAG_pointer_type ] > - // CHECK-DAG: ![[ST]] ={{.*}} metadata ![[ARGS:[0-9]+]], i32 0, null, > null, null} ; [ DW_TAG_subroutine_type ] > - // CHECK-DAG: ![[ARGS]] = {{.*}} metadata ![[UNSPEC]]} > + // CHECK: ![[PST]] ={{.*}} metadata ![[BTY]]} ; [ DW_TAG_pointer_type ] > } > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
