9#ifndef LLVM_OBJCOPY_COMMONCONFIG_H
10#define LLVM_OBJCOPY_COMMONCONFIG_H
101 std::shared_ptr<Regex> R;
102 std::shared_ptr<GlobPattern> G;
103 bool IsPositiveMatch =
true;
107 NameOrPattern(std::shared_ptr<GlobPattern>
G,
bool IsPositiveMatch)
108 :
G(
G), IsPositiveMatch(IsPositiveMatch) {}
124 return R ? R->match(S) :
G ?
G->match(S) : Name == S;
133 std::vector<NameOrPattern> PosPatterns;
134 std::vector<NameOrPattern> NegMatchers;
140 if (Matcher->isPositiveMatch()) {
141 if (std::optional<StringRef> MaybeName = Matcher->getName())
144 PosPatterns.push_back(std::move(*Matcher));
146 NegMatchers.push_back(std::move(*Matcher));
156 return PosNames.
empty() && PosPatterns.empty() && NegMatchers.empty();
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.
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.
NameMatcher SymbolsToGlobalize
StringMap< SectionRename > SectionsToRename
NameMatcher SymbolsToRemove
std::optional< MachineInfo > OutputArch
std::vector< StringRef > DumpSection
std::vector< NewSectionInfo > UpdateSection
bool ExtractMainPartition
bool DecompressDebugSections
NameMatcher SymbolsToKeep
StringRef AddGnuDebugLink
StringMap< uint64_t > SetSectionAlignment
NameMatcher SymbolsToWeaken
uint32_t GnuDebugLinkCRC32
NameMatcher SymbolsToKeepGlobal
std::vector< NewSymbolInfo > SymbolsToAdd
DebugCompressionType CompressionType
StringMap< SectionFlagsUpdate > SetSectionFlags
bool DeterministicArchives
NameMatcher UnneededSymbolsToRemove
std::optional< StringRef > ExtractPartition
std::vector< NewSectionInfo > AddSection
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)
std::vector< StringRef > BeforeSyms
std::vector< SymbolFlag > Flags
std::optional< SectionFlag > NewFlags