[flang-commits] [flang] [flang] Remove hardcoded bits from AddDebugInfo. (PR #89231)

via flang-commits flang-commits at lists.llvm.org
Fri Apr 19 04:28:04 PDT 2024


================
@@ -283,34 +301,35 @@ inline void createOpenMPFIRPassPipeline(
 }
 
 #if !defined(FLANG_EXCLUDE_CODEGEN)
-inline void createDebugPasses(
-    mlir::PassManager &pm, llvm::codegenoptions::DebugInfoKind debugLevel) {
+inline void createDebugPasses(mlir::PassManager &pm,
+    llvm::codegenoptions::DebugInfoKind debugLevel,
+    llvm::OptimizationLevel OptLevel, llvm::StringRef inputFilename) {
   // Currently only -g1, -g, -gline-tables-only supported
   switch (debugLevel) {
   case llvm::codegenoptions::DebugLineTablesOnly:
-    addDebugInfoPass(pm);
+    addDebugInfoPass(pm, debugLevel, OptLevel, inputFilename);
     return;
   case llvm::codegenoptions::NoDebugInfo:
     return;
   default:
     // TODO: Add cases and passes for other debug options.
     // All other debug options not implemented yet, currently emits warning
     // and generates as much debug information as possible.
-    addDebugInfoPass(pm);
+    addDebugInfoPass(pm, debugLevel, OptLevel, inputFilename);
     return;
----------------
abidh wrote:

Thanks for the suggestion. Done now.

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


More information about the flang-commits mailing list