[clang] [CIR] Use target int and size_t widths in cir.libc.memchr (PR #217153)

Rithik Sharma via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 20 11:30:19 PDT 2026


================
@@ -117,13 +117,12 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
               astContext.getTargetInfo().getPointerAlign(LangAS::Default))
           .getQuantity();
 
-  const unsigned charSize = astContext.getTargetInfo().getCharWidth();
+  const unsigned charSize = target.getCharWidth();
   uCharTy = cir::IntType::get(&getMLIRContext(), charSize, /*isSigned=*/false);
 
   // TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
----------------
SharmaRithik wrote:

That was an old TODO that got moved with my changes. I have placed it next to the attributes it refers to now. Thanks, I missed that.

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


More information about the cfe-commits mailing list