[llvm-branch-commits] [llvm-branch] r106572 - in /llvm/branches/Apple/Troughton/test/FrontendC++: thunk-linkonce-odr.cpp thunk-weak-odr.cpp

Bill Wendling isanbard at gmail.com
Tue Jun 22 13:34:05 PDT 2010


Author: void
Date: Tue Jun 22 15:34:05 2010
New Revision: 106572

URL: http://llvm.org/viewvc/llvm-project?rev=106572&view=rev
Log:
Change for r106569.

Added:
    llvm/branches/Apple/Troughton/test/FrontendC++/thunk-linkonce-odr.cpp
Removed:
    llvm/branches/Apple/Troughton/test/FrontendC++/thunk-weak-odr.cpp

Added: llvm/branches/Apple/Troughton/test/FrontendC++/thunk-linkonce-odr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Troughton/test/FrontendC%2B%2B/thunk-linkonce-odr.cpp?rev=106572&view=auto
==============================================================================
--- llvm/branches/Apple/Troughton/test/FrontendC++/thunk-linkonce-odr.cpp (added)
+++ llvm/branches/Apple/Troughton/test/FrontendC++/thunk-linkonce-odr.cpp Tue Jun 22 15:34:05 2010
@@ -0,0 +1,33 @@
+// RUN: %llvmgxx %s -S -o - | FileCheck %s
+// <rdar://problem/7929157> & <rdar://problem/8104369>
+
+struct A {
+  virtual int f() { return 1; }
+};
+
+struct B {
+  virtual int f() { return 2; }
+};
+
+struct C : A, B {
+  virtual int f() { return 3; }
+};
+
+struct D : C {
+  virtual int f() { return 4; }
+};
+
+static int f(D* d) {
+  B* b = d;
+  return b->f();
+};
+
+int g() {
+  D d;
+  return f(&d);
+}
+
+// Thunks should be marked as "linkonce ODR" not "weak".
+//
+// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1C1fEv
+// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1D1fEv

Removed: llvm/branches/Apple/Troughton/test/FrontendC++/thunk-weak-odr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Troughton/test/FrontendC%2B%2B/thunk-weak-odr.cpp?rev=106571&view=auto
==============================================================================
--- llvm/branches/Apple/Troughton/test/FrontendC++/thunk-weak-odr.cpp (original)
+++ llvm/branches/Apple/Troughton/test/FrontendC++/thunk-weak-odr.cpp (removed)
@@ -1,33 +0,0 @@
-// RUN: %llvmgxx %s -S -o - | FileCheck %s
-// <rdar://problem/7929157>
-
-struct A {
-  virtual int f() { return 1; }
-};
-
-struct B {
-  virtual int f() { return 2; }
-};
-
-struct C : A, B {
-  virtual int f() { return 3; }
-};
-
-struct D : C {
-  virtual int f() { return 4; }
-};
-
-static int f(D* d) {
-  B* b = d;
-  return b->f();
-};
-
-int g() {
-  D d;
-  return f(&d);
-}
-
-// Thunks should be marked as "weak ODR", not just "weak".
-//
-// CHECK: define weak_odr i32 @_ZThn{{[48]}}_N1C1fEv
-// CHECK: define weak_odr i32 @_ZThn{{[48]}}_N1D1fEv





More information about the llvm-branch-commits mailing list