Skip to content

Commit 0bc44a1

Browse files
committed
[upstream-update] Update for removal of clang::LangOptions::ImplementationOfModule.
It was unified with ModuleName. Now a flag is set to say if ModuleName is the implementation module or not.
1 parent acf4c48 commit 0bc44a1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/IDE/Utils.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,12 @@ bool ide::initInvocationByClangArguments(ArrayRef<const char *> ArgList,
335335
CCArgs.push_back(Entry);
336336
}
337337

338-
if (!ClangInvok->getLangOpts()->ImplementationOfModule.empty()) {
338+
if (!ClangInvok->getLangOpts()->CompilingModule) {
339339
CCArgs.push_back("-Xclang");
340-
CCArgs.push_back("-fmodule-implementation-of");
341-
CCArgs.push_back("-Xclang");
342-
CCArgs.push_back(ClangInvok->getLangOpts()->ImplementationOfModule);
340+
llvm::SmallString<64> Str;
341+
Str += "-fmodule-name=";
342+
Str += ClangInvok->getLangOpts()->CurrentModule;
343+
CCArgs.push_back(Str.str());
343344
}
344345

345346
if (PPOpts.DetailedRecord) {

0 commit comments

Comments
 (0)