[llvm] [SPIR-V] Emit DebugTypeBasic for NonSemantic DI (PR #106980)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 05:19:59 PDT 2024


================
@@ -104,6 +109,24 @@ bool SPIRVEmitNonSemanticDI::emitGlobalDI(MachineFunction &MF) {
                 cast<ConstantAsMetadata>(Op->getOperand(2))->getValue())
                 ->getSExtValue();
     }
+
+    // This traversal is the only supported way to access
+    // instruction related DI metadata like DIBasicType
+    for (auto &F : *M) {
+      for (auto &BB : F) {
----------------
bwlodarcz wrote:

The one you provided yes. It's in the current version. 

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


More information about the llvm-commits mailing list