Use nullptr as the default message consumer to ignore all messages.
authorLei Zhang <antiagainst@google.com>
Wed, 21 Sep 2016 20:45:53 +0000 (16:45 -0400)
committerLei Zhang <antiagainst@google.com>
Wed, 21 Sep 2016 21:23:03 +0000 (17:23 -0400)
commit1ca817a38e2ab347de218ab620aa0456fd2cfde0
treeb525b8a46c2e3f5ee4a07dc1669aef792d03978b
parent6effeaa7f1eed3d6856ed5eb928d54d3ac2d29fc
Use nullptr as the default message consumer to ignore all messages.

There is no difference between the previous IgnoreMessage() function
and a null std::function, from functionality's perspective.
The user can set nullptr as the MessageConsumer, so need to guard
against nullptr before calling the consumer anyway. It's better
we use it internally so that it may expose problems by us instead
of the user.
source/message.h
source/opt/pass.h
source/opt/pass_manager.h
test/opt/pass_fixture.h
test/opt/test_def_use.cpp
test/opt/test_ir_loader.cpp
test/opt/test_module.cpp
test/opt/test_type_manager.cpp