[PATCH] D123390: [demangler][NFC] OperatorInfo table unit test

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 07:02:18 PDT 2022


urnathan created this revision.
urnathan added reviewers: iains, JDevlieghere, libc++abi.
Herald added a project: All.
urnathan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Placing a run-once test inside the operator lookup function caused problems with the thread sanitizer. See D122975 <https://reviews.llvm.org/D122975>.

D123158 <https://reviews.llvm.org/D123158> attempted to address the warning with an atomic once-only approach, but missed the libcxxabi use.

This break out the operator table into a member variable, and move the test to the unit test machinery.

I have verify the unit test triggers, if you do misorder the table.

(The table could be shared across instantiations of the demangler, but that requires either inline-vars (a c++17 thing), or a separate object file.)


https://reviews.llvm.org/D123390

Files:
  libcxxabi/src/demangle/ItaniumDemangle.h
  llvm/include/llvm/Demangle/ItaniumDemangle.h
  llvm/unittests/Demangle/ItaniumDemangleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123390.421517.patch
Type: text/x-patch
Size: 24593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220408/9cb8a696/attachment.bin>


More information about the llvm-commits mailing list