[llvm] [SPIRV][NFC] Refactor pointer creation in GlobalRegistery (PR #134429)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 07:56:20 PDT 2025
================
@@ -1693,6 +1728,43 @@ SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVArrayType(
}
SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
+ Type *BaseType, MachineInstr &I, SPIRV::StorageClass::StorageClass SC) {
+ MachineIRBuilder MIRBuilder(I);
+ return getOrCreateSPIRVPointerType(BaseType, MIRBuilder, SC);
+}
+
+SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
+ Type *BaseType, MachineIRBuilder &MIRBuilder,
----------------
s-perron wrote:
Good catch. I believe I did not add the const because the original function with the SPIRVType did not use const.
I still have to leave on const cast, but this is a little better.
https://github.com/llvm/llvm-project/pull/134429
More information about the llvm-commits
mailing list