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

via flang-commits flang-commits at lists.llvm.org
Mon Apr 22 03:15:33 PDT 2024


================
@@ -52,21 +55,40 @@ void AddDebugInfoPass::runOnOperation() {
   mlir::ModuleOp module = getOperation();
   mlir::MLIRContext *context = &getContext();
   mlir::OpBuilder builder(context);
-  std::string inputFilePath("-");
-  if (auto fileLoc = module.getLoc().dyn_cast<mlir::FileLineColLoc>())
-    inputFilePath = fileLoc.getFilename().getValue();
+  llvm::StringRef fileName;
+  std::string filePath;
----------------
abidh wrote:

`DWARF` has `DW_AT_use_UTF8` attribute which can be used to say that program entities and filenames use `UTF-8` representation.

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


More information about the flang-commits mailing list