[llvm] [SPIR-V] Emit DebugTypePointer from NonSemantic DI (PR #109287)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 04:42:47 PDT 2024


================
@@ -247,11 +263,31 @@ bool SPIRVEmitNonSemanticDI::emitGlobalDI(MachineFunction &MF) {
       const Register AttributeEncodingReg =
           GR->buildConstantInt(AttributeEncoding, MIRBuilder, I32Ty, false);
 
-      [[maybe_unused]]
       const Register BasicTypeReg =
           EmitDIInstruction(SPIRV::NonSemanticExtInst::DebugTypeBasic,
                             {BasicTypeStrReg, ConstIntBitwidthReg,
                              AttributeEncodingReg, I32ZeroReg});
+      BasicTypeRegPairs.emplace_back(BasicType, BasicTypeReg);
+    }
+
+    if (PointerDerivedTypes.size()) {
+      const Register GenericStorageClass =
----------------
MrSidims wrote:

We should call getDWARFAddressSpace from https://llvm.org/doxygen/classllvm_1_1DIDerivedType.html instead. 

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


More information about the llvm-commits mailing list