Benchmark specific fixes
authorElizabeth Smith <elizabeths@fb.com>
Wed, 7 May 2014 00:41:09 +0000 (17:41 -0700)
committerDave Watson <davejwatson@fb.com>
Tue, 20 May 2014 19:53:57 +0000 (12:53 -0700)
commitbe60435ff726fa2528e2857d9003e09e53596d86
tree723d28b3fc80b5ae44c6609ccad533ff451834b5
parentc5c3f9f85b52d5e5aa0399c0fdce9916ede1c393
Benchmark specific fixes

Summary:
benchmark is necessary to get the tests running
primarily replacing a few inline asm items with MSVC intrinsics and do not optimize tricks
also a fix for use of the gcc specific ## with __VAR_ARGS__
although that is primarily intended as a workaround for trailing commas, gcc apparently cuts off all items in the macro afterwards
this was being used for a clever/dirty trick to do one or none for a macro
replaced instead with a version that will work for all other compilers (might need to be expanded for more args, but for now it's working with all current usage)

@override-unit-failures

also fixed a use of max without specifying a template type that was making msvc barf - specifying it (as in the min case) made it compile cleanly

Test Plan: fbconfig -r folly && fbmake runtests

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1313609
folly/Benchmark.cpp
folly/Benchmark.h
folly/Preprocessor.h