bool runOnFunction() {
if (!ClStack) return false;
- if (ClRedzoneByvalArgs) copyArgsPassedByValToAllocas();
+ if (ClRedzoneByvalArgs && !ClForceDynamicShadow)
+ copyArgsPassedByValToAllocas();
// Collect alloca, ret, lifetime instructions etc.
for (BasicBlock *BB : depth_first(&F.getEntryBlock())) visit(*BB);
; This check verifies that arguments passed by value get redzones.
; RUN: opt < %s -asan -asan-realign-stack=32 -S | FileCheck %s
+; RUN: opt < %s -asan -asan-realign-stack=32 -asan-force-dynamic-shadow -S | FileCheck %s --check-prefixes=CHECK-FDS
+
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
declare i32 @bar(%struct.A*)
+; CHECK-FDS-NOT: {{\.byval}}
+
; Test behavior for named argument with explicit alignment. The memcpy and
; alloca alignments should match the explicit alignment of 64.
define void @foo(%struct.A* byval align 64 %a) sanitize_address {