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

This PR adds following options to the AddDebugInfo pass.

1. IsOptimized flag.
2. Level of debug info to generate.
3. Name of the source file

This enables us to remove the hard coded values from the code. It also
allows us to test the pass with different options. The tests have been
modified to take advantage of that.

The calling convention flag and producer name have also been improved.
This commit is contained in:
Abid Qadeer
2024-04-23 19:11:43 +01:00
committed by GitHub
parent 5fe93b0a4d
commit 5f3f9d1a90
8 changed files with 121 additions and 59 deletions

View File

@@ -809,7 +809,7 @@ void CodeGenAction::generateLLVMIR() {
}
// Create the pass pipeline
fir::createMLIRToLLVMPassPipeline(pm, config);
fir::createMLIRToLLVMPassPipeline(pm, config, getCurrentFile());
(void)mlir::applyPassManagerCLOptions(pm);
// run the pass manager