LLVM 18.0.0git
ConfigManager.cpp
Go to the documentation of this file.
1//===- ConfigManager.cpp --------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/Support/Errc.h"
11#include "llvm/Support/Error.h"
12
13namespace llvm {
14namespace objcopy {
15
28 "option is not supported for COFF");
29
30 return COFF;
31}
32
47 "option is not supported for MachO");
48
49 return MachO;
50}
51
63 !Common.SymbolsToRename.empty())
65 "only flags for section dumping, removal, and "
66 "addition are supported");
67
68 return Wasm;
69}
70
76 !Common.DumpSection.empty() || !Common.SymbolsToAdd.empty() ||
90 return createStringError(
92 "no flags are supported yet, only basic copying is allowed");
93 }
94
95 return XCOFF;
96}
97
98} // end namespace objcopy
99} // end namespace llvm
Tagged union holding either a T or a Error.
Definition: Error.h:474
bool empty() const
Definition: StringMap.h:94
constexpr bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:134
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Definition: Error.h:1244
StringMap< SectionRename > SectionsToRename
Definition: CommonConfig.h:242
std::vector< StringRef > DumpSection
Definition: CommonConfig.h:224
StringMap< uint64_t > SetSectionAlignment
Definition: CommonConfig.h:243
std::vector< NewSymbolInfo > SymbolsToAdd
Definition: CommonConfig.h:249
StringMap< SectionFlagsUpdate > SetSectionFlags
Definition: CommonConfig.h:244
NameMatcher UnneededSymbolsToRemove
Definition: CommonConfig.h:237
std::optional< StringRef > ExtractPartition
Definition: CommonConfig.h:216
std::vector< NewSectionInfo > AddSection
Definition: CommonConfig.h:223
StringMap< StringRef > SymbolsToRename
Definition: CommonConfig.h:246
StringMap< uint64_t > SetSectionType
Definition: CommonConfig.h:245
Expected< const XCOFFConfig & > getXCOFFConfig() const override
Expected< const COFFConfig & > getCOFFConfig() const override
Expected< const MachOConfig & > getMachOConfig() const override
Expected< const WasmConfig & > getWasmConfig() const override