Fix MSVC warning when __forceinline is paired with inline.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks like maybe it's going in the opposite direction from 2e4ca848f45f08fec084e886280a2e45e48b6e1b - might be interesting to understand why the issue that patch was addressing aren't applicable anymore. (& why this change is now needed when the code's been this way for years?)
Verified attribute((always_inline)) should be paired with inline. I think this should work.
To answer the question, it's just a warning, so my guess is that people chose to ignore it. Or maybe it only used to trigger for inline + inline, and not __forceinline + inline.
It's specifically C4141: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4141
Changed "attribute((always_inline)) inline" to "inline attribute((always_inline))" to match Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/blob/35938c15e22e3021f7693425f0d2134845c81f6b/src/util/macros.h#L144
Once a patch is approved, helps to ask to have it committed - otherwise folks tend to assume you have commit access and will commit it yourself. (I've gone ahead and committed this - it should automatically update the phab review and link the commit)
(details here: https://llvm.org/docs/Contributing.html#how-to-submit-a-patch "If you do not have commit access, please let people know during the review and someone should commit it on your behalf.")
Also, if you could upload future patches with full context that's handy (arc will do this for you, but if you are going to submit reviews via the web interface, this discusses how to include more context)