[PATCH] D96852: [clang][SVE] Remove inline keyword from arm_sve.h

Joe Ellis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 17 06:10:02 PST 2021


joechrisellis planned changes to this revision.
joechrisellis added a comment.

Speaking to @DavidTruby about this, it appears that this fix is insufficient -- `inline` has important semantic meaning in C++ that means that we can't simply omit the keyword here.

The `inline` keyword bypasses the one-definition rule. If we have a function defined in a header that isn't marked `inline`, and you include that header in two different source files, then your program is ill formed because it contains 2 definitions of that function. So we have to keep it for C++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96852/new/

https://reviews.llvm.org/D96852



More information about the cfe-commits mailing list