[ORC] Add a NonOwningSymbolStringPtr utility.
authorLang Hames <lhames@gmail.com>
Sun, 22 Jan 2023 18:30:15 +0000 (10:30 -0800)
committerLang Hames <lhames@gmail.com>
Tue, 31 Jan 2023 22:28:21 +0000 (14:28 -0800)
commiteded5d381565d1d2f0951b745dd767fc5fba3576
tree510cc4a4c8718830de5e45e9f751c7bbdce6edcf
parenta22a22a73c8ac5d4976d923afd60e7a1cf7346da
[ORC] Add a NonOwningSymbolStringPtr utility.

Introduces a non-owning SymbolStringPool entry pointer. Instances of the new
type can be compared with SymbolStringPtr instances, but do not participate in
ref-counting and are therefore cheaper to copy. This makes it efficient to use
in algorithms that use symbol-strings as ids, e.g. ORC's waiting-on graph. A
future commit will rewrite ORC's waiting-on graph.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D142314
llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
llvm/unittests/ExecutionEngine/Orc/SymbolStringPoolTest.cpp