[clang] [Clang][TableGen] Use PointerType::get(Context) in MVE TableGen emitter (PR #124782)

Mats Jun Larsen via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 28 08:32:11 PST 2025


https://github.com/junlarsen created https://github.com/llvm/llvm-project/pull/124782

Follow-up to #123569

I don't know if directly using the CodeGenModule here is the best solution. Let me know if there's something better to use.

>From bc77542fe58bdc94566a9a589039856de50617b0 Mon Sep 17 00:00:00 2001
From: Mats Jun Larsen <mats at jun.codes>
Date: Wed, 29 Jan 2025 01:29:01 +0900
Subject: [PATCH] [Clang][TableGen] Use PointerType::get(Context) in MVE
 TableGen emitter

Follow-up to #123569
---
 clang/utils/TableGen/MveEmitter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 58a4d3c22ac366..334aedbb8592b5 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -210,7 +210,7 @@ class PointerType : public Type {
     return Name + " *";
   }
   std::string llvmName() const override {
-    return "llvm::PointerType::getUnqual(" + Pointee->llvmName() + ")";
+    return "llvm::PointerType::getUnqual(CGM.getLLVMContext())";
   }
   const Type *getPointeeType() const { return Pointee; }
 



More information about the cfe-commits mailing list