[PATCH] Trivial patch that cleans up some function signatures from unused parameters.

David Blaikie dblaikie at gmail.com
Mon Jun 16 13:53:13 PDT 2014


>>! In D4162#8, @zturner wrote:
> The previous revision goes back over 8 years, and the commiter (Reid Spencer) doesn't seem to be active anymore.  I thought about adding some comments to the methods, but really that comes down to adding a comment to every method of ExecutionEngineState, because those are all the methods that this dummy-parameter was being passed to.  In other words, access to the entire ExecutionEngineState object is serialized.  But this is already clear IMO because that is actually the whole purpose of the class, as described by the comment at lines 56 and 57 of ExecutionEngine.h

Fair enough. Sounds good to me then. It's not like, even if it is that idiom, it's one we subscribe to with any consistency in LLVM so it seems of little value.

(for my money, one day, we'll have a safe<T> (I'm sure there are already better names for this, probably under standardization as we speak) where you access it only by passing in a lambda:

s.do_stuff([](T& t) { ... });

so you can't forget to lock it, the safe<T> acquires a lock, then calls the lambda with the underlying object and the lock held. Short of leaking the T out there, you can't go far wrong)

http://reviews.llvm.org/D4162






More information about the llvm-commits mailing list