aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2022-08-22 15:42:52 -0700
committerBen Langmuir <blangmuir@apple.com>2022-08-23 08:18:14 -0700
commit3708a148421fd0449081b9a91fba28f51f1dfb12 (patch)
tree76a651ef3d22c609cb09dc46558a4a8be3f640b6 /clang/lib/Frontend/CompilerInstance.cpp
parent86bfab2723618772f5c4ffc2a68eedca592c6928 (diff)
downloadllvm-3708a148421fd0449081b9a91fba28f51f1dfb12.zip
llvm-3708a148421fd0449081b9a91fba28f51f1dfb12.tar.gz
llvm-3708a148421fd0449081b9a91fba28f51f1dfb12.tar.bz2
[clang] Pull some utility functions into CompilerInvocation NFC
Move copying compiler arguments to a vector<string> and modifying common module-related options into CompilerInvocation in preparation for using some of them in more places and to avoid duplicating this code accidentally in the future. Differential Revision: https://reviews.llvm.org/D132419
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index e3b5447..03b5d04 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1150,8 +1150,7 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
// For any options that aren't intended to affect how a module is built,
// reset them to their default values.
- Invocation->getLangOpts()->resetNonModularOptions();
- PPOpts.resetNonModularOptions();
+ Invocation->resetNonModularOptions();
// Remove any macro definitions that are explicitly ignored by the module.
// They aren't supposed to affect how the module is built anyway.