[llvm-commits] [llvm] r83239 - /llvm/trunk/test/FrontendC++/member-alignment.cpp
Evan Cheng
evan.cheng at apple.com
Thu Oct 1 23:07:47 PDT 2009
Author: evancheng
Date: Fri Oct 2 01:07:47 2009
New Revision: 83239
URL: http://llvm.org/viewvc/llvm-project?rev=83239&view=rev
Log:
C++ member functions must be 2 byte aligned per ABI.
Added:
llvm/trunk/test/FrontendC++/member-alignment.cpp
Added: llvm/trunk/test/FrontendC++/member-alignment.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/member-alignment.cpp?rev=83239&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC++/member-alignment.cpp (added)
+++ llvm/trunk/test/FrontendC++/member-alignment.cpp Fri Oct 2 01:07:47 2009
@@ -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
+}
More information about the llvm-commits
mailing list