[PATCH] D61177: [MinGW] Always emit local typeinfo

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 12:30:42 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rC359345: [MinGW] Always emit local typeinfo (authored by mstorsjo, committed by ).

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61177/new/

https://reviews.llvm.org/D61177

Files:
  lib/CodeGen/ItaniumCXXABI.cpp
  test/CodeGenCXX/vtable-key-function-ios.cpp


Index: lib/CodeGen/ItaniumCXXABI.cpp
===================================================================
--- lib/CodeGen/ItaniumCXXABI.cpp
+++ lib/CodeGen/ItaniumCXXABI.cpp
@@ -2959,7 +2959,7 @@
     bool IsDLLImport = RD->hasAttr<DLLImportAttr>();
 
     // Don't import the RTTI but emit it locally.
-    if (CGM.getTriple().isWindowsGNUEnvironment() && IsDLLImport)
+    if (CGM.getTriple().isWindowsGNUEnvironment())
       return false;
 
     if (CGM.getVTables().isVTableExternal(RD))
Index: test/CodeGenCXX/vtable-key-function-ios.cpp
===================================================================
--- test/CodeGenCXX/vtable-key-function-ios.cpp
+++ test/CodeGenCXX/vtable-key-function-ios.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 %s -triple=armv7-apple-darwin -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=armv7-apple-darwin -emit-llvm -o - | FileCheck -check-prefixes=CHECK,CHECK-UNIX %s
 // RUN: %clang_cc1 %s -triple=armv7-apple-darwin -emit-llvm -o - | FileCheck -check-prefix=CHECK-LATE %s
 
-// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck -check-prefixes=CHECK,CHECK-MINGW %s
 // RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck -check-prefix=CHECK-LATE %s
 
 // The 'a' variants ask for the vtable first.
@@ -29,7 +29,8 @@
 // V-table should be defined externally.
 Test0a::Test0a() { use(typeid(Test0a)); }
 // CHECK: @_ZTV6Test0a = external {{(dso_local )?}}unnamed_addr constant 
-// CHECK: @_ZTI6Test0a = external {{(dso_local )?}}constant
+// CHECK-UNIX: @_ZTI6Test0a = external {{(dso_local )?}}constant
+// CHECK-MINGW: @_ZTI6Test0a = linkonce_odr {{(dso_local )?}}constant
 
 // This is not a key function.
 void Test0a::foo() {}
@@ -48,7 +49,8 @@
 // V-table should be defined externally.
 Test0b::Test0b() { use(typeid(Test0b)); }
 // CHECK: @_ZTV6Test0b = external {{(dso_local )?}}unnamed_addr constant 
-// CHECK: @_ZTI6Test0b = external {{(dso_local )?}}constant
+// CHECK-UNIX: @_ZTI6Test0b = external {{(dso_local )?}}constant
+// CHECK-MINGW: @_ZTI6Test0b = linkonce_odr {{(dso_local )?}}constant
 
 /*** Test1a ******************************************************************/
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61177.196903.patch
Type: text/x-patch
Size: 2280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190426/61ee377e/attachment.bin>


More information about the cfe-commits mailing list