[PATCH] D41078: [ARM] Register the Thumb2SizeReducePass

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 04:31:06 PST 2017


dmgreen added a comment.

Thanks for taking a look.



================
Comment at: lib/Target/ARM/Thumb2SizeReduction.cpp:166
 
-    Thumb2SizeReduce(std::function<bool(const Function &)> Ftor);
+    Thumb2SizeReduce(std::function<bool(const Function &)> Ftor = nullptr);
 
----------------
eastig wrote:
> Why do we need an empty function by default?
INITIALIZE_PASS expects it to be default constructable.

As createThumb2SizeReductionPass already acts this same way (has a nullptr default argument), it's already able to handle null arguments here.


https://reviews.llvm.org/D41078





More information about the llvm-commits mailing list