diff options
author | Fangrui Song <i@maskray.me> | 2024-10-06 17:38:35 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-10-06 17:38:35 -0700 |
commit | f2b01338584c90f48dba1a937bf5b1da8dcedbd5 (patch) | |
tree | 1651ff4e252a3ad96f017074d59a3ac36c2c2d2f /lld/ELF/ScriptParser.cpp | |
parent | 18ca7ad3393241b9fc0d5f149247e10837c6f926 (diff) | |
download | llvm-f2b01338584c90f48dba1a937bf5b1da8dcedbd5.zip llvm-f2b01338584c90f48dba1a937bf5b1da8dcedbd5.tar.gz llvm-f2b01338584c90f48dba1a937bf5b1da8dcedbd5.tar.bz2 |
[ELF] Move static nextGroupId isInGroup to LinkerDriver
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r-- | lld/ELF/ScriptParser.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index cc0e8ce..3febcfb 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -385,12 +385,10 @@ void ScriptParser::readExtern() { } void ScriptParser::readGroup() { - bool orig = InputFile::isInGroup; - InputFile::isInGroup = true; + SaveAndRestore saved(ctx.driver.isInGroup, true); readInput(); - InputFile::isInGroup = orig; - if (!orig) - ++InputFile::nextGroupId; + if (!saved.get()) + ++ctx.driver.nextGroupId; } void ScriptParser::readInclude() { |