Commit Graph

12 Commits

Author SHA1 Message Date
John McCall
a2f6dd4129 [NFC] Appropriately delete and noexcept TaggedUnion's special members 2022-03-27 18:23:16 -04:00
Ben Barham
a051a181b9 [rebranch] Include C++ std headers where required
These appear to be implicitly included somewhere by MacOS but not by
Linux. Add explicitly.
2021-12-01 15:45:06 +10:00
John McCall
319cc795d8 Add a simple TaggedUnion defined in terms of ExternalUnion. NFC. 2020-02-04 15:05:39 -05:00
Joe Groff
4012a207c8 MetadataReader: Add an API for reading absolute pointers.
Pointer data in some remote reflection targets may required relocation, or may not be
fully resolvable, such as when we're dumping info from a single image on disk that
references other dynamic libraries. Add a `RemoteAbsolutePointer` type that can hold a
symbol, offset, or combination of both, and add APIs to `MemoryReader` and `MetadataReader`
for reading pointers that can get unresolved relocation info from an image, or apply
relocations to pointer information. MetadataReader can use the symbol name information to
fill in demanglings of symbolic-reference-bearing mangled names by using the information
from the symbol name to fill in the name even though the context descriptors are not
available.

For now, this is NFC (MemoryReader::resolvePointer just forwards the pointer data), but
lays the groundwork for implementation of relocation in ObjectMemoryReader.
2019-09-28 16:53:34 -07:00
JF Bastien
31e6a989f5 [NFC] Don't use LLVM_ALIGNAS (#26411)
It's not useful anymore, and I'm about to remove it in upstream.
2019-07-30 13:14:02 -07:00
John McCall
b80808bbc1 Make it easier to define an ExternalUnion where the kind type is
just used to select the union storage, rather than having any
external meaning.
2018-01-09 01:15:01 -05:00
John McCall
6e4c83d30b Remove the need for magic numbers when making an ExternalUnion. NFC. 2017-07-27 22:52:51 -04:00
John McCall
2b71710794 Add ExternalUnion::resetToEmpty, which transitions the union from
a known-non-empty state to a known-empty state.
2017-07-15 01:12:55 -04:00
John McCall
65d8c9c9c6 Build fix on systems without std::is_trivially_copyable. 2017-07-09 01:05:06 -04:00
John McCall
0efcc0860e Minor enhancements to ExternalUnion, NFC:
- add the ability to assert triviality
- add the ability to construct via list-initialization (T{x,y})
2017-07-08 21:38:13 -04:00
John McCall
5684996d05 Fix non-asserts builds of ExternalUnion. 2017-04-26 18:54:25 -04:00
John McCall
f0801832e3 Add a convenient class for defining unions whose discriminator
is stored externally.
2017-04-26 14:15:44 -04:00