C++ member functions must be 2 byte aligned per ABI.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 2 Oct 2009 06:07:47 +0000 (06:07 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 2 Oct 2009 06:07:47 +0000 (06:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83239 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendC++/member-alignment.cpp [new file with mode: 0644]

diff --git a/test/FrontendC++/member-alignment.cpp b/test/FrontendC++/member-alignment.cpp
new file mode 100644 (file)
index 0000000..cf18d6a
--- /dev/null
@@ -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
+}