Skip to content

Commit 516976b

Browse files
committed
Address Feedback Nr.2
1 parent 7cb0fc4 commit 516976b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

lld/MachO/Config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct Configuration {
143143
bool timeTraceEnabled = false;
144144
bool dataConst = false;
145145
bool dedupStrings = true;
146+
bool dedupSymbolStrings = true;
146147
bool deadStripDuplicates = false;
147148
bool omitDebugInfo = false;
148149
bool warnDylibInstallName = false;
@@ -256,8 +257,6 @@ struct Configuration {
256257
llvm::MachO::PlatformType platform() const {
257258
return platformInfo.target.Platform;
258259
}
259-
260-
bool deduplicateSymbolStrings = true;
261260
};
262261

263262
extern std::unique_ptr<Configuration> config;

lld/MachO/Driver.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,8 +1806,7 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
18061806
config->keepICFStabs = args.hasArg(OPT_keep_icf_stabs);
18071807
config->dedupStrings =
18081808
args.hasFlag(OPT_deduplicate_strings, OPT_no_deduplicate_strings, true);
1809-
config->deduplicateSymbolStrings =
1810-
!args.hasArg(OPT_no_deduplicate_symbol_strings);
1809+
config->dedupSymbolStrings = !args.hasArg(OPT_no_deduplicate_symbol_strings);
18111810
config->deadStripDuplicates = args.hasArg(OPT_dead_strip_duplicates);
18121811
config->warnDylibInstallName = args.hasFlag(
18131812
OPT_warn_dylib_install_name, OPT_no_warn_dylib_install_name, false);

lld/MachO/SyntheticSections.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,8 +1541,7 @@ StringTableSection::StringTableSection()
15411541

15421542
uint32_t StringTableSection::addString(StringRef str) {
15431543
uint32_t strx = size;
1544-
if (config->deduplicateSymbolStrings) {
1545-
// Deduplicate strings
1544+
if (config->dedupSymbolStrings) {
15461545
llvm::CachedHashStringRef hashedStr(str);
15471546
auto [it, inserted] = stringMap.try_emplace(hashedStr, strx);
15481547
if (!inserted)

0 commit comments

Comments
 (0)