From b3fa7e4e40d7a20e7ff9b5feab61ae01d5dcf661 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 20 Nov 2009 00:32:16 +0000 Subject: [PATCH] Testcase for r89415. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89417 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC/cstring-align.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/FrontendC/cstring-align.c diff --git a/test/FrontendC/cstring-align.c b/test/FrontendC/cstring-align.c new file mode 100644 index 00000000000..1320dd349b0 --- /dev/null +++ b/test/FrontendC/cstring-align.c @@ -0,0 +1,16 @@ +// RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32 +// RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64 + +extern void func(const char *, const char *); + +void long_function_name() { + func("%s: the function name", __func__); +} + +// DARWIN64: .align 3 +// DARWIN64: ___func__. +// DARWIN64: .asciz "long_function_name" + +// DARWIN32: .align 2 +// DARWIN32: ___func__. +// DARWIN32: .asciz "long_function_name"