[clang] [Clang] Reuse the function getOptimizationLevel in tools::addLTOOptions. (PR #169762)

Jim Lin via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 1 21:08:19 PST 2025


================
@@ -916,6 +922,12 @@ void applyOverrideOptions(SmallVectorImpl<const char *> &Args,
                           raw_ostream *OS = nullptr);
 
 } // end namespace driver
+
+unsigned getOptimizationLevel(const llvm::opt::ArgList &Args, InputKind IK,
+                              DiagnosticsEngine &Diags);
+
+unsigned getOptimizationLevelSize(const llvm::opt::ArgList &Args);
+
----------------
tclin914 wrote:

Move these functions to `clang::driver` namespace. Thanks.

https://github.com/llvm/llvm-project/pull/169762


More information about the cfe-commits mailing list