[flang-commits] [flang] ebc2c71 - [flang][nfc] Clarify the usage of llvmArgs and mlirArgs

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Fri Jul 21 08:24:22 PDT 2023


Author: Andrzej Warzynski
Date: 2023-07-21T16:24:07+01:00
New Revision: ebc2c71d63b69d90aadf07968f821267442f56ef

URL: https://github.com/llvm/llvm-project/commit/ebc2c71d63b69d90aadf07968f821267442f56ef
DIFF: https://github.com/llvm/llvm-project/commit/ebc2c71d63b69d90aadf07968f821267442f56ef.diff

LOG: [flang][nfc] Clarify the usage of llvmArgs and mlirArgs

Differential Revision: https://reviews.llvm.org/D155931

Added: 
    

Modified: 
    flang/lib/Frontend/CompilerInvocation.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 43fecca280c570..b1f0d27a925ed2 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -950,9 +950,14 @@ bool CompilerInvocation::createFromArgs(
   success &= parseSemaArgs(res, args, diags);
   success &= parseDialectArgs(res, args, diags);
   success &= parseDiagArgs(res, args, diags);
+
+  // Collect LLVM (-mllvm) and MLIR (-mmlir) options.
+  // NOTE: Try to avoid adding any options directly to `llvmArgs` or
+  // `mlirArgs`. Instead, you can use
+  //    * `-mllvm <your-llvm-option>`, or
+  //    * `-mmlir <your-mlir-option>`.
   res.frontendOpts.llvmArgs =
       args.getAllArgValues(clang::driver::options::OPT_mllvm);
-
   res.frontendOpts.mlirArgs =
       args.getAllArgValues(clang::driver::options::OPT_mmlir);
 


        


More information about the flang-commits mailing list