[ADT] Add a default constructor and a bool conversion to function_ref.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 9 Jul 2017 06:12:56 +0000 (06:12 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 9 Jul 2017 06:12:56 +0000 (06:12 +0000)
commita809f28956fabc28d29103aada5f72cf847efe91
treea484c2527a0bc4c5a619523e68fc3f7124eb0894
parentb80b44b7b9a47058c3df08e390517617968ebc83
[ADT] Add a default constructor and a bool conversion to function_ref.

The internal representation has a natural way to handle this and it
seems nicer than having to wrap this in an optional (with its own
separate flag).

This also matches how std::function works.

llvm-svn: 307490
llvm/include/llvm/ADT/STLExtras.h
llvm/unittests/ADT/FunctionRefTest.cpp