9#ifndef LLVM_OBJCOPY_COMMONCONFIG_H
10#define LLVM_OBJCOPY_COMMONCONFIG_H
95 std::shared_ptr<Regex> R;
96 std::shared_ptr<GlobPattern> G;
97 bool IsPositiveMatch =
true;
101 NameOrPattern(std::shared_ptr<GlobPattern>
G,
bool IsPositiveMatch)
102 :
G(
G), IsPositiveMatch(IsPositiveMatch) {}
118 return R ? R->match(S) :
G ?
G->match(S) : Name == S;
134 if (Matcher->isPositiveMatch()) {
135 if (std::optional<StringRef> MaybeName = Matcher->getName())
138 PosPatterns.
push_back(std::move(*Matcher));
140 NegMatchers.
push_back(std::move(*Matcher));
This file defines the StringMap class.
This file defines CachedHashString and CachedHashStringRef.
This file defines the DenseSet and SmallDenseSet classes.
This file defines the SmallVector class.
A container which contains a StringRef plus a precomputed hash.
Implements a dense probed hash-table based set.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
std::pair< iterator, bool > insert(const ValueT &V)
bool contains(const_arg_type_t< ValueT > V) const
Check if the set contains the given element.
An efficient, type-erasing, non-owning reference to a callable.
bool matches(StringRef S) const
Error addMatcher(Expected< NameOrPattern > Matcher)
std::optional< StringRef > getName() const
bool isPositiveMatch() const
bool operator!=(StringRef S) const
bool operator==(StringRef S) const
static Expected< NameOrPattern > create(StringRef Pattern, MatchStyle MS, llvm::function_ref< Error(Error)> ErrorCallback)
This is an optimization pass for GlobalISel generic memory operations.
@ LLVM_MARK_AS_BITMASK_ENUM
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Implement std::hash so that hash_code can be used in STL containers.
SmallVector< SectionPatternAddressUpdate, 0 > ChangeSectionAddress
SmallVector< NewSectionInfo, 0 > UpdateSection
NameMatcher SymbolsToGlobalize
int64_t ChangeSectionLMAValAll
StringMap< SectionRename > SectionsToRename
NameMatcher SymbolsToRemove
std::optional< MachineInfo > OutputArch
SmallVector< std::pair< NameMatcher, llvm::DebugCompressionType >, 0 > compressSections
bool ExtractMainPartition
bool DecompressDebugSections
SmallVector< StringRef, 0 > DumpSection
SmallVector< NewSymbolInfo, 0 > SymbolsToAdd
NameMatcher SymbolsToKeep
StringRef AddGnuDebugLink
StringMap< uint64_t > SetSectionAlignment
NameMatcher SymbolsToWeaken
uint32_t GnuDebugLinkCRC32
NameMatcher SymbolsToKeepGlobal
DebugCompressionType CompressionType
StringMap< SectionFlagsUpdate > SetSectionFlags
bool DeterministicArchives
NameMatcher SymbolsToSkip
SmallVector< NewSectionInfo, 0 > AddSection
NameMatcher UnneededSymbolsToRemove
StringRef SymbolsPrefixRemove
std::optional< StringRef > ExtractPartition
StringRef AllocSectionsPrefix
StringMap< StringRef > SymbolsToRename
NameMatcher SymbolsToLocalize
StringMap< uint64_t > SetSectionType
MachineInfo(uint16_t EM, bool Is64, bool IsLittle)
MachineInfo(uint16_t EM, uint8_t ABI, bool Is64, bool IsLittle)
std::shared_ptr< MemoryBuffer > SectionData
NewSectionInfo(StringRef Name, std::unique_ptr< MemoryBuffer > &&Buffer)
SmallVector< StringRef, 0 > BeforeSyms
SmallVector< SymbolFlag, 0 > Flags
NameMatcher SectionPattern
std::optional< SectionFlag > NewFlags