[llvm] r202199 - Address review comments for r202188.

Adrian Prantl aprantl at apple.com
Wed Feb 26 15:56:41 PST 2014


On Feb 26, 2014, at 15:52, Justin Bogner <mail at justinbogner.com> wrote:

> 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.

Maybe I just find the documentation confusing, but doesn’t this:

> There is no requirement that CHECK-LABEL: directives contain strings that correspond to actual syntactic labels in a source or output language: they must simply uniquely match a single line in the file being verified.

mean that each “LABEL” must be unique in the file?

-- adrian



More information about the llvm-commits mailing list