[flang-commits] [flang] [flang][debug] Always include (kind=X) suffix in debug type names (PR #186255)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Tue Mar 17 05:19:02 PDT 2026
================
@@ -79,8 +79,16 @@ static mlir::LLVM::DITypeAttr genBasicType(mlir::MLIRContext *context,
context, llvm::dwarf::DW_TAG_base_type, name, bitSize, decoding);
}
+static mlir::StringAttr getBasicTypeName(mlir::MLIRContext *context,
+ llvm::StringRef baseName,
+ unsigned bitSize) {
+ std::ostringstream oss;
+ oss << baseName.str() << "(kind=" << (bitSize / 8) << ")";
+ return mlir::StringAttr::get(context, oss.str());
+}
+
static mlir::LLVM::DITypeAttr genPlaceholderType(mlir::MLIRContext *context) {
- return genBasicType(context, mlir::StringAttr::get(context, "integer"),
+ return genBasicType(context, getBasicTypeName(context, "integer", 32),
----------------
tarunprabhu wrote:
Would this be affected if the default integer kind were set to 8? Should this be 32 regardless?
https://github.com/llvm/llvm-project/pull/186255
More information about the flang-commits
mailing list