brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · db69fbf Raw
35 lines · plain
1; RUN: opt -safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s2; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s3; RUN: opt -passes=safe-stack -S -mtriple=i386-pc-linux-gnu < %s -o - | FileCheck %s4; RUN: opt -passes=safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck %s5 6%struct.pair = type { i32, i32 }7 8@.str = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 19 10; Addr-of a struct element passed into an invoke instruction.11;   (GEP followed by an invoke)12;  safestack attribute13; Requires protector.14define i32 @foo() uwtable safestack personality ptr @__gxx_personality_v0 {15entry:16  ; CHECK: __safestack_unsafe_stack_ptr17  %c = alloca %struct.pair, align 418  %exn.slot = alloca ptr19  %ehselector.slot = alloca i3220  store i32 0, ptr %c, align 421  invoke void @_Z3exceptPi(ptr %c)22          to label %invoke.cont unwind label %lpad23 24invoke.cont:25  ret i32 026 27lpad:28  %0 = landingpad { ptr, i32 }29          catch ptr null30  ret i32 031}32 33declare void @_Z3exceptPi(ptr)34declare i32 @__gxx_personality_v0(...)35