aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-08-31 13:44:31 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-09-05 13:23:53 -0700
commit5746002ebb9c3d02be408edf13c2edc39aecf591 (patch)
treeba7475fabaf14d59464135814c4c4af863ff70b3 /clang/lib/Frontend/CompilerInstance.cpp
parentb0cbf3a0dac51d426dd38c307f745e74f409aed7 (diff)
downloadllvm-5746002ebb9c3d02be408edf13c2edc39aecf591.zip
llvm-5746002ebb9c3d02be408edf13c2edc39aecf591.tar.gz
llvm-5746002ebb9c3d02be408edf13c2edc39aecf591.tar.bz2
[clang] NFCI: Change returned LanguageOptions pointer to reference
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 0bbfb2a..e500675 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1185,11 +1185,11 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
});
// If the original compiler invocation had -fmodule-name, pass it through.
- Invocation->getLangOpts()->ModuleName =
- ImportingInstance.getInvocation().getLangOpts()->ModuleName;
+ Invocation->getLangOpts().ModuleName =
+ ImportingInstance.getInvocation().getLangOpts().ModuleName;
// Note the name of the module we're building.
- Invocation->getLangOpts()->CurrentModule = std::string(ModuleName);
+ Invocation->getLangOpts().CurrentModule = std::string(ModuleName);
// Make sure that the failed-module structure has been allocated in
// the importing instance, and propagate the pointer to the newly-created
@@ -2175,7 +2175,7 @@ void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc,
FrontendInputFile Input(
ModuleMapFileName,
- InputKind(getLanguageFromOptions(*Invocation->getLangOpts()),
+ InputKind(getLanguageFromOptions(Invocation->getLangOpts()),
InputKind::ModuleMap, /*Preprocessed*/true));
std::string NullTerminatedSource(Source.str());