llvm-ir-editor
llvm-ir-editor copied to clipboard
Need to handle "readonly" parameters
If "readonly" is removed from the second parameter %b, all works fine:
; ModuleID = '/tmp/webcompile/_4097_0.bc' target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind uwtable define void @foralon(i32* nocapture %a, i32* nocapture readonly %b) #0 { entry: %0 = load i32* %b, align 4, !tbaa !1 store i32 %0, i32* %a, align 4, !tbaa !1 ret void }
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.ident = !{!0}
!0 = metadata !{metadata !"clang version 3.6.0 (trunk)"} !1 = metadata !{metadata !2, metadata !2, i64 0} !2 = metadata !{metadata !"int", metadata !3, i64 0} !3 = metadata !{metadata !"omnipotent char", metadata !4, i64 0} !4 = metadata !{metadata !"Simple C/C++ TBAA"}