0
讀取元數據我有一個LLVM IR指令如下:store i32 %i.0, i32* %arrayidx, align 4 !0
注意,我連接元數據!0
到指令。而對於我的目的,這代表我已經聲明如下元數據字符串: !0 = !{!"hello"}
現在我嘗試閱讀本使用 if (Inst.getMetadata("hello"))
錯誤而在LLVM IR
然而,在執行這個,我得到以下錯誤: opt: <stdin>:32:43: error: expected instruction opcode store i32 %i.0, i32* %arrayidx, align 4 !0
燦有人請指出,我在這裏可能做錯了什麼?