[ORC] Further improvements to SymbolStringPtr & NonOwningSymbolStringPtr.
authorLang Hames <lhames@gmail.com>
Tue, 31 Jan 2023 22:43:11 +0000 (14:43 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 1 Feb 2023 00:41:26 +0000 (16:41 -0800)
commit81334f4b018ea5781aa32388a5a51805b1004141
treee4e306b99c642e755e9d5fc17650e3009f80c17c
parentcd97675e02368f31d56bd8f143c5987649d162d8
[ORC] Further improvements to SymbolStringPtr & NonOwningSymbolStringPtr.

A follow-up to https://reviews.llvm.org/D142314:

* Make SymbolStringPtrs constructible from NonOwningSymbolStringPtrs.

* Move and rename getRefCount and isValid (now poolEntryIsAlive) to improve
readability. Also updates these routines to make them safe for use with
sentinel values (null, empty, tombstone).

* Move ref-counting operations into their own incRef and decRef methods.
llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
llvm/unittests/ExecutionEngine/Orc/SymbolStringPoolTest.cpp