[PATCH] D104736: [LangRef] add note to warn-frame-size about ODR

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 12:52:32 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/docs/LangRef.rst:2055-2058
+    than `UINT_MAX`. It's considered an ODR violation by LLVM to have two
+    definitions of the same function with differing values of this function
+    attribute using ``linkonce``, ``linkonce_odr``, ``weak``, or ``weak_odr``
+    linkage.
----------------
That's probably not correct/feasible - ODR violations are "invalid, NDR" ie: pretty close to UB. Actually it'd be very easy for us to detect this (& we did in the old module metadata version) and reject it - so I think we've demonstrated that this is acceptable, but that we make no guarantees about which threshold will be respected.

C++-ish language would be to say "it's unspecified which threshold will be used when duplicate definitions are linked together"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104736



More information about the llvm-commits mailing list