[PATCH] Add observers to Input Graph

Michael Spencer bigcheesegs at gmail.com
Tue May 13 00:57:11 PDT 2014


================
Comment at: include/lld/Core/InputGraph.h:74
@@ +73,3 @@
+  /// being returned.
+  void registerObserver(std::function<void(File *)> &fn);
+
----------------
Simon Atanasyan wrote:
> Maybe it is better to use the `llvm::function_ref` class to be consistent with main LLVM code.
> 
> http://llvm.org/docs/ProgrammersManual.html#passing-functions-and-other-callable-objects
This is news to me. I would much prefer we use std::function.

So after doing some research, it seems that advanced uses of std::function can fail on VC11 (VS 2012). We're not doing that here, and the buildbots have the final say in what is supported.

http://reviews.llvm.org/D3735






More information about the llvm-commits mailing list