aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp8
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() {