[clang] [CIR] Upstream DynamicCastOp (PR #161734)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 5 04:04:34 PDT 2025


================
@@ -601,6 +601,60 @@ def CIR_VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// DynamicCastInfoAttr
+//===----------------------------------------------------------------------===//
+
+def CIR_DynamicCastInfoAttr : CIR_Attr<"DynamicCastInfo", "dyn_cast_info"> {
+  let summary = "ABI specific information about a dynamic cast";
+  let description = [{
+    Provide ABI specific information about a dynamic cast operation.
+
+    The `srcRtti` and the `destRtti` parameters give the RTTI of the source
----------------
xlauko wrote:

No strong opinion here, I see pros/cons for both. I think snake_case is more conventional for tablegen primitives. PErsonaly I find it more readable, though this sometimes leads to weird names as it is used to generate camelCase in C++. (e.g. `openMP_xxx`). Advantage of having camelCase is to have same name is in C++ and easier code grepping and orientation.

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


More information about the cfe-commits mailing list