Patch suggestion: Add calls to doInitialization() and doFinalization() in verifyFunction()

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Oct 30 15:41:55 PDT 2013


I committed it as r193719.

On 30 October 2013 16:16, Michael Kruse <llvm-commits at meinersbur.de> wrote:
> I am happy to see that my first patch submission looks good. However, I
> cannot commit it because I have no write access to the repository.
>
> Michael
>
>
>
> 2013/10/25 Rafael EspĂ­ndola <rafael.espindola at gmail.com>
>>
>> LGTM
>>
>> On 25 October 2013 05:43, Michael Kruse <llvm-commits at meinersbur.de>
>> wrote:
>> > The function verifyFunction() in lib/IR/Verifier.cpp misses some calls.
>> > It
>> > creates a temporary FunctionPassManager that will run a single Verifier
>> > pass. Unfortunately, FunctionPassManager is no PassManager and does not
>> > call
>> > doInitialization() and doFinalization() by itself. Verifier does
>> > important
>> > tasks in doInitialization() such as collecting type information used to
>> > check DebugInfo metadata and doFinalization() does some additional
>> > checks.
>> > Therefore these checks were missed and debug info couldn't be verified
>> > at
>> > all, it just crashed if the function had some.
>> >
>> > verifyFunction() is currently not used in llvm unless -debug option is
>> > enabled, and in unittests/IR/VerifierTest.cpp
>> >
>> > VerifierTest had to be changed to create the function in a module from
>> > which
>> > the type debug info can be collected.
>> >
>> > Patch applicable to r193391.
>> >
>> > Regards,
>> > Michael Kruse
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> >
>
>




More information about the llvm-commits mailing list