aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 664b678..b0654f9 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2475,14 +2475,9 @@ static void GenerateFrontendArgs(const FrontendOptions &Opts,
for (const auto &PluginArg : PluginArgs.second)
GenerateArg(Args, OPT_plugin_arg, PluginArgs.first + PluginArg, SA);
- for (const auto &Ext : Opts.ModuleFileExtensions) {
- if (auto *TestExt = dyn_cast_or_null<TestModuleFileExtension>(Ext.get())) {
- std::string Buffer;
- llvm::raw_string_ostream OS(Buffer);
- OS << *TestExt;
- GenerateArg(Args, OPT_ftest_module_file_extension_EQ, OS.str(), SA);
- }
- }
+ for (const auto &Ext : Opts.ModuleFileExtensions)
+ if (auto *TestExt = dyn_cast_or_null<TestModuleFileExtension>(Ext.get()))
+ GenerateArg(Args, OPT_ftest_module_file_extension_EQ, TestExt->str(), SA);
if (!Opts.CodeCompletionAt.FileName.empty())
GenerateArg(Args, OPT_code_completion_at, Opts.CodeCompletionAt.ToString(),