[PATCH] D39864: Fix for CFI type tests lowering assert.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 14:02:51 PST 2017


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

Assuming that you've made the obvious change to the set type locally, this LGTM.



================
Comment at: llvm/test/Transforms/LowerTypeTests/blockaddress-2.ll:11
+%struct.f = type { i32 (i32*)*, i32 (i32*)* }
+ at llvm.used = external global [43 x i8*], section "llvm.metadata"
+ at badfileops = internal global %struct.f { i32 (i32*)* @bad_f, i32 (i32*)* @bad_f }, align 8
----------------
If this line isn't necessary to reproduce the bug, please remove it.


================
Comment at: llvm/test/Transforms/LowerTypeTests/blockaddress-2.ll:16
+
+define internal i32 @bad_f(i32* nocapture readnone) !type !1 {
+  ret i32 9
----------------
You can probably remove the argument list and return void.


================
Comment at: llvm/test/Transforms/LowerTypeTests/blockaddress-2.ll:20
+
+define internal fastcc i32 @do_f(i32, i32, i32*, i32, i64, i32) unnamed_addr !type !2 {
+  %7 = tail call i1 @llvm.type.test(i8* undef, metadata !"_ZTSFiP4fileP3uioP5ucrediP6threadE"), !nosanitize !3
----------------
Same here.


https://reviews.llvm.org/D39864





More information about the llvm-commits mailing list