[llvm] r202199 - Address review comments for r202188.

Justin Bogner mail at justinbogner.com
Wed Feb 26 15:52:55 PST 2014


Adrian Prantl <aprantl at apple.com> writes:
> On Feb 25, 2014, at 15:07, Eric Christopher <echristo at gmail.com> wrote:
>
>>> +; Test debug info for variadic function arguments.
>>> +; Created from tools/clang/tests/CodeGenCXX/debug-info-varargs.cpp
>>> +;
>>> +; The ... parameter of variadic should be emitted as
>>> +; DW_TAG_unspecified_parameters.
>>> ;
>>> ; Normal variadic function.
>>> +; void b(int c, ...);
>>> ;
>>> ; CHECK: DW_TAG_subprogram
>>> ; CHECK-NOT: DW_TAG
>>> +; CHECK: DW_AT_name {{.*}} "b"
>>> +; CHECK-NOT: DW_TAG
>>> ; CHECK: DW_TAG_formal_parameter
>>> ; CHECK-NOT: DW_TAG
>>> ; CHECK: DW_TAG_unspecified_parameters
>> 
>> Are the CHECK-NOT just used to skip or ...? Bit confusing. Can you
>> comment them?
>
> With the CHECK-NOT: DW_TAG we make sure that the next match is still
> within the same DW_TAG_subprogram. It’s the best tool FileCheck offers
> to escape the limitations of regular expressions.

Isn't this what "CHECK-LABEL" is for? IIUC you can change the subprogram
checks to "CHECK-LABEL: DW_TAG_subprogram" and drop the CHECK-NOTs to
get the behaviour you want.




More information about the llvm-commits mailing list