Skip to content

Commit b1287b8

Browse files
committed
Clear module alias map instead of asserting in computeModuleName
in FE args converter Resolves rdar://85571923
1 parent 32c8bbe commit b1287b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,10 @@ bool ArgsToFrontendOptionsConverter::computeModuleAliases() {
570570
}
571571

572572
bool ArgsToFrontendOptionsConverter::computeModuleName() {
573-
assert(Opts.ModuleAliasMap.empty() && "Module name must be computed before computing module aliases");
573+
// Module name must be computed before computing module
574+
// aliases. Instead of asserting, clearing ModuleAliasMap
575+
// here since it can be called redundantly in batch-mode
576+
Opts.ModuleAliasMap.clear();
574577

575578
const Arg *A = Args.getLastArg(options::OPT_module_name);
576579
if (A) {

0 commit comments

Comments
 (0)