[clang] c1f797e - [CIR] Fix build due to the improvement after 91cdd35008e9

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 12 10:42:24 PDT 2025


Author: Michael Liao
Date: 2025-08-12T13:42:12-04:00
New Revision: c1f797ea6dd1abb8ccacdbd2f473896893b69bdf

URL: https://github.com/llvm/llvm-project/commit/c1f797ea6dd1abb8ccacdbd2f473896893b69bdf
DIFF: https://github.com/llvm/llvm-project/commit/c1f797ea6dd1abb8ccacdbd2f473896893b69bdf.diff

LOG: [CIR] Fix build due to the improvement after 91cdd35008e9

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenClass.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenClass.cpp b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
index 9bf7b6cc4b933..31c93cd00d083 100644
--- a/clang/lib/CIR/CodeGen/CIRGenClass.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenClass.cpp
@@ -284,7 +284,8 @@ void CIRGenFunction::initializeVTablePointer(mlir::Location loc,
   } else {
     // We can just use the base offset in the complete class.
     nonVirtualOffset = vptr.base.getBaseOffset();
-    baseValueTy = convertType(getContext().getTagDeclType(vptr.base.getBase()));
+    baseValueTy =
+        convertType(getContext().getCanonicalTagType(vptr.base.getBase()));
   }
 
   // Apply the offsets.


        


More information about the cfe-commits mailing list