================
@@ -82,6 +83,14 @@ void 
CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd,
   theModule.push_back(funcOp);
 }
 
+void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd,
+                                           bool isTentative) {
+  mlir::Type type = getTypes().convertType(vd->getType());
+  auto varOp = builder.create<cir::GlobalOp>(
+      getLoc(vd->getSourceRange()), vd->getIdentifier()->getName(), type);
----------------
dkolsen-pgi wrote:

Fixed.  The code checks `getIdentifier()`.  If it is null, an error is reported 
and the declaration is skipped.  This is temporary until the code handles 
non-identifier names.


https://github.com/llvm/llvm-project/pull/118743
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to