[PATCH] D31633: test for thinlto handling of internal linkage

Bob Haarman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 17:16:01 PDT 2017


inglorion created this revision.
Herald added a subscriber: Prazek.

https://reviews.llvm.org/D31633

Files:
  test/CodeGenCXX/thinlto-promote-internals.cpp


Index: test/CodeGenCXX/thinlto-promote-internals.cpp
===================================================================
--- /dev/null
+++ test/CodeGenCXX/thinlto-promote-internals.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc19.0.24215 -emit-llvm \
+// RUN:     -flto=thin -flto-unit -o - %s | FileCheck %s
+
+// CHECK: @"\01??_7B@?A@@6B@" = internal unnamed_addr alias
+// CHECK: define internal %"class.(anonymous namespace)::B"
+
+class A {
+public:
+  virtual int foo() { return 0; }
+};
+
+namespace {
+  class B : public A { };
+}
+
+A *makeA() { return new B(); }
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31633.93977.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170404/c1b66fc8/attachment-0001.bin>


More information about the cfe-commits mailing list