[llvm] r185206 - Fix CodeGen/PowerPC/stack-protector.ll on OpenBSD

Hal Finkel hfinkel at anl.gov
Fri Jun 28 13:18:14 PDT 2013


Author: hfinkel
Date: Fri Jun 28 15:18:14 2013
New Revision: 185206

URL: http://llvm.org/viewvc/llvm-project?rev=185206&view=rev
Log:
Fix CodeGen/PowerPC/stack-protector.ll on OpenBSD

On OpenBSD, the stack-smash protection transform uses "__guard_local"
and "__stack_smash_handler" instead of "__stack_chk_guard" and
"__stack_chk_fail".  However, CodeGen/PowerPC/stack-protector.ll
doesn't specify a target OS, so on OpenBSD it fails.

Add -mtriple=ppc32-unknown-linux to make the test host-OS agnostic. While
there, convert to FileCheck.

Patch by Matthew Dempsky.

Modified:
    llvm/trunk/test/CodeGen/PowerPC/stack-protector.ll

Modified: llvm/trunk/test/CodeGen/PowerPC/stack-protector.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/stack-protector.ll?rev=185206&r1=185205&r2=185206&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/stack-protector.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/stack-protector.ll Fri Jun 28 15:18:14 2013
@@ -1,5 +1,6 @@
-; RUN: llc -march=ppc32 < %s -o - | grep "__stack_chk_guard"
-; RUN: llc -march=ppc32 < %s -o - | grep "__stack_chk_fail"
+; RUN: llc -march=ppc32 -mtriple=ppc32-unknown-linux < %s | FileCheck %s
+; CHECK: __stack_chk_guard
+; CHECK: __stack_chk_fail
 
 @"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00"		; <[11 x i8]*> [#uses=1]
 





More information about the llvm-commits mailing list