Go to the documentation of this file.
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()) {
144 PosPatterns.push_back(
std::move(*Matcher));
146 NegMatchers.push_back(
std::move(*Matcher));
156 return PosNames.
empty() && PosPatterns.empty() && NegMatchers.empty();
271 #endif // LLVM_OBJCOPY_COMMONCONFIG_H
bool operator==(StringRef S) const
Generic address nodes are lowered to some combination of target independent and machine specific ABI
This is an optimization pass for GlobalISel generic memory operations.
#define LLVM_MARK_AS_BITMASK_ENUM(LargestValue)
LLVM_MARK_AS_BITMASK_ENUM lets you opt in an individual enum type so you can perform bitwise operatio...
NameMatcher SymbolsToWeaken
bool matches(StringRef S) const
Optional< MachineInfo > OutputArch
static ErrorSuccess success()
Create a success value.
StringMap< StringRef > SymbolsToRename
Tagged union holding either a T or a Error.
MachineInfo(uint16_t EM, bool Is64, bool IsLittle)
std::pair< iterator, bool > insert(const ValueT &V)
std::vector< StringRef > BeforeSyms
Optional< StringRef > getName() const
DebugCompressionType CompressionType
NameMatcher SymbolsToKeep
std::vector< NewSectionInfo > AddSection
std::vector< StringRef > DumpSection
NameMatcher SymbolsToGlobalize
bool isPositiveMatch() const
std::shared_ptr< MemoryBuffer > SectionData
NewSectionInfo(StringRef Name, std::unique_ptr< MemoryBuffer > &&Buffer)
Error addMatcher(Expected< NameOrPattern > Matcher)
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
A container which contains a StringRef plus a precomputed hash.
An efficient, type-erasing, non-owning reference to a callable.
Implements a dense probed hash-table based set.
bool DeterministicArchives
NameMatcher SymbolsToLocalize
NameMatcher SymbolsToKeepGlobal
NameMatcher UnneededSymbolsToRemove
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Optional< SectionFlag > NewFlags
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
uint32_t GnuDebugLinkCRC32
std::vector< NewSymbolInfo > SymbolsToAdd
StringRef - Represent a constant reference to a string, i.e.
bool contains(const_arg_type_t< ValueT > V) const
Check if the set contains the given element.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
StringMap< uint64_t > SetSectionAlignment
bool operator!=(StringRef S) const
Lightweight error class with error context and mandatory checking.
std::vector< NewSectionInfo > UpdateSection
static Expected< NameOrPattern > create(StringRef Pattern, MatchStyle MS, llvm::function_ref< Error(Error)> ErrorCallback)
Optional< StringRef > ExtractPartition
std::vector< SymbolFlag > Flags
Error takeError()
Take ownership of the stored error.
StringMap< SectionRename > SectionsToRename
NameMatcher SymbolsToRemove
bool DecompressDebugSections
bool ExtractMainPartition
StringMap< SectionFlagsUpdate > SetSectionFlags
LLVM Value Representation.
StringRef AddGnuDebugLink
StringRef AllocSectionsPrefix
MachineInfo(uint16_t EM, uint8_t ABI, bool Is64, bool IsLittle)