TomTan added a comment. In D57915#1389788 <https://reviews.llvm.org/D57915#1389788>, @efriedma wrote:
> I did some quick testing with MSVC; apparently it inlines the implementations > of these functions when optimizations are on. We definitely want to support > inlining these. Since these are commonly used in performance-sensitive code, > I'd prefer to implement the required changes to > CodeGenFunction::EmitMSVCBuiltinExpr now, rather than chase after weird > performance regressions in the future. > > --- > > I'm not sure how you could end up with a "duplicate symbols" error from the > current implementation, though; these functions are marked "static", so they > shouldn't conflict with the real _byteswap_* functions. It is a great idea to inline these in Clang, could this be tracked for a separate bug? The issue blocks Chromium build for Windows ARM64. Yes, they are marked as `static inline` in `intrin.h` and are expected to link fine, but there are cases `stdlib.h` is included before including `intrin.h`, the former provides global declaration which seems inherited by the definition in `intrin.h`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57915/new/ https://reviews.llvm.org/D57915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits