LLVM: lib/ObjCopy/ConfigManager.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
12
13using namespace llvm;
15
17 if (.ExtractSection.empty())
19 "option is not supported for ELF");
20 return ELF;
21}
22
24 if (.SplitDWO.empty() ||
.SymbolsPrefix.empty() ||
25 .SymbolsPrefixRemove.empty() ||
.SymbolsToSkip.empty() ||
26 .AllocSectionsPrefix.empty() ||
.KeepSection.empty() ||
27 .SymbolsToGlobalize.empty() ||
.SymbolsToKeep.empty() ||
28 .SymbolsToLocalize.empty() ||
.SymbolsToWeaken.empty() ||
29 .SymbolsToKeepGlobal.empty() ||
.SectionsToRename.empty() ||
30 .SetSectionAlignment.empty() ||
.SetSectionType.empty() ||
33 Common.DecompressDebugSections ||
35 .SymbolsToAdd.empty() || Common.GapFill != 0 ||
36 Common.PadTo != 0 || Common.ChangeSectionLMAValAll != 0 ||
37 .ChangeSectionAddress.empty() ||
.ExtractSection.empty())
39 "option is not supported for COFF");
40
42}
43
45 if (.SplitDWO.empty() ||
.SymbolsPrefix.empty() ||
46 .SymbolsPrefixRemove.empty() ||
47 .AllocSectionsPrefix.empty() ||
.KeepSection.empty() ||
48 .SymbolsToKeep.empty() ||
.SectionsToRename.empty() ||
49 .UnneededSymbolsToRemove.empty() ||
50 .SetSectionAlignment.empty() ||
.SetSectionFlags.empty() ||
51 .SetSectionType.empty() || Common.ExtractDWO ||
53 Common.StripNonAlloc || Common.StripSections ||
54 Common.DecompressDebugSections || Common.StripUnneeded ||
56 .SymbolsToAdd.empty() || Common.GapFill != 0 ||
57 Common.PadTo != 0 || Common.ChangeSectionLMAValAll != 0 ||
58 .ChangeSectionAddress.empty() ||
.ExtractSection.empty())
60 "option is not supported for MachO");
61
63}
64
66 if (.AddGnuDebugLink.empty() || Common.ExtractPartition ||
67 .SplitDWO.empty() ||
.SymbolsPrefix.empty() ||
68 .SymbolsPrefixRemove.empty() ||
.SymbolsToSkip.empty() ||
69 .AllocSectionsPrefix.empty() ||
71 .SymbolsToGlobalize.empty() ||
.SymbolsToLocalize.empty() ||
72 .SymbolsToKeep.empty() ||
.SymbolsToRemove.empty() ||
73 .UnneededSymbolsToRemove.empty() ||
74 .SymbolsToWeaken.empty() ||
.SymbolsToKeepGlobal.empty() ||
75 .SectionsToRename.empty() ||
.SetSectionAlignment.empty() ||
76 .SetSectionFlags.empty() ||
.SetSectionType.empty() ||
77 .SymbolsToRename.empty() || Common.GapFill != 0 ||
78 Common.PadTo != 0 || Common.ChangeSectionLMAValAll != 0 ||
79 .ChangeSectionAddress.empty() ||
.ExtractSection.empty())
81 "only flags for section dumping, removal, and "
82 "addition are supported");
83
85}
86
88 if (.AddGnuDebugLink.empty() || Common.ExtractPartition ||
89 .SplitDWO.empty() ||
.SymbolsPrefix.empty() ||
90 .SymbolsPrefixRemove.empty() ||
.SymbolsToSkip.empty() ||
91 .AllocSectionsPrefix.empty() ||
93 .DumpSection.empty() ||
.SymbolsToAdd.empty() ||
94 .KeepSection.empty() ||
.OnlySection.empty() ||
95 .ToRemove.empty() ||
.SymbolsToGlobalize.empty() ||
96 .SymbolsToKeep.empty() ||
.SymbolsToLocalize.empty() ||
97 .SymbolsToRemove.empty() ||
98 .UnneededSymbolsToRemove.empty() ||
99 .SymbolsToWeaken.empty() ||
.SymbolsToKeepGlobal.empty() ||
100 .SectionsToRename.empty() ||
.SetSectionAlignment.empty() ||
101 .SetSectionFlags.empty() ||
.SetSectionType.empty() ||
102 .SymbolsToRename.empty() || Common.ExtractDWO ||
103 Common.ExtractMainPartition || Common.OnlyKeepDebug ||
106 Common.Weaken || Common.StripUnneeded || Common.DecompressDebugSections ||
108 Common.ChangeSectionLMAValAll != 0 ||
109 .ChangeSectionAddress.empty() ||
.ExtractSection.empty()) {
112 "no flags are supported yet, only basic copying is allowed");
113 }
114
116}
117
120
121
122 if (.AddGnuDebugLink.empty() ||
.SplitDWO.empty() ||
123 .AllocSectionsPrefix.empty() ||
125 .KeepSection.empty() ||
.SectionsToRename.empty() ||
126 .SetSectionAlignment.empty() ||
.SetSectionFlags.empty() ||
127 .SetSectionType.empty() || Common.ExtractDWO ||
130 Common.StripUnneeded || Common.DecompressDebugSections ||
132 Common.ChangeSectionLMAValAll != 0 ||
133 .ChangeSectionAddress.empty()) {
135 "option is not supported for DXContainer");
136 }
138}
Tagged union holding either a T or a Error.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Expected< const DXContainerConfig & > getDXContainerConfig() const override
Definition ConfigManager.cpp:119
Expected< const XCOFFConfig & > getXCOFFConfig() const override
Definition ConfigManager.cpp:87
Expected< const WasmConfig & > getWasmConfig() const override
Definition ConfigManager.cpp:65
Expected< const ELFConfig & > getELFConfig() const override
Definition ConfigManager.cpp:16
Expected< const COFFConfig & > getCOFFConfig() const override
Definition ConfigManager.cpp:23
Expected< const MachOConfig & > getMachOConfig() const override
Definition ConfigManager.cpp:44
DXContainerConfig DXContainer