From 72758db30377b5c442feb11d0d3993b3e3ec6a25 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 2 Oct 2009 06:07:47 +0000 Subject: [PATCH] C++ member functions must be 2 byte aligned per ABI. llvm-svn: 83239 --- test/FrontendC++/member-alignment.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/FrontendC++/member-alignment.cpp diff --git a/test/FrontendC++/member-alignment.cpp b/test/FrontendC++/member-alignment.cpp new file mode 100644 index 00000000000..cf18d6a6867 --- /dev/null +++ b/test/FrontendC++/member-alignment.cpp @@ -0,0 +1,19 @@ +// RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s + +// rdar://7268289 + +class t { +public: + virtual void foo(void); + void bar(void); +}; + +void +t::bar(void) { +// CHECK: _ZN1t3barEv{{.*}} align 2 +} + +void +t::foo(void) { +// CHECK: _ZN1t3fooEv{.*}} align 2 +}