mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Move paltry linker section name length assert into Mach-O case
This is where it really matters - the section name has to be 16 characters or less.
This commit is contained in:
@@ -202,12 +202,12 @@ public:
|
||||
|
||||
static std::string getReflectionSectionName(IRGenModule &IGM,
|
||||
std::string Base) {
|
||||
assert(Base.size() <= 7
|
||||
&& "Mach-O section name length must be <= 16 characters");
|
||||
SmallString<50> SectionName;
|
||||
llvm::raw_svector_ostream OS(SectionName);
|
||||
switch (IGM.TargetInfo.OutputObjectFormat) {
|
||||
case llvm::Triple::MachO:
|
||||
assert(Base.size() <= 7
|
||||
&& "Mach-O section name length must be <= 16 characters");
|
||||
OS << "__DATA, __swift3_" << Base << ", regular, no_dead_strip";
|
||||
break;
|
||||
case llvm::Triple::ELF:
|
||||
|
||||
Reference in New Issue
Block a user