[PATCH] D103935: Add Twine support for std::string_view.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 10:10:07 PDT 2021


MaskRay added a comment.

llvm/include has such `__cplusplus` dispatches in a few other places, e.g. `llvm/include/llvm/ADT/StringRef.h` L82 `strLen`. So those (-std=c++14 libLLVM.so + -std=c++17 application using llvm/include headers) users are already relying on benign ODR violation.

LLVM has `-fvisibility-inlines-hidden`, and an additional -Bsymbolic-functions for safeguard, after compiling into libLLVM.so, the ODR violation should be benign.

Ensuring that struct/enum sizes are the same for different -std= modes is probably a sufficient fix to regular users (and a sufficiently good workaround for libLLVM.so with mixed -std= users).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103935



More information about the llvm-commits mailing list