The annotation must precede the declaration to which it appertains
during the definition. The re-ordering was silently accepted by clang
but is not correct as per the GNU style. This was flagged by GCC 7.
Recent Swift uses 2 as the is-Swift bit when running on newer versions, and 1 on older versions. Since it's difficult or impossible to know what we'll be running on at build time, make the selection at runtime.
The incorrect location of the ABI marker would result in the symbol not being
exposed when building with `cl` as it expects `__declspec(dllexport)` to be
after the return type.
Mark the exported interfaces in the tool for the `ENABLE_EXPORTS`
to work properly. This fixes the dependency tracking on Windows
and ensures that the tool is not continuously rebuilt.
Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.