[PATCH] D59561: Make __cpu_model a hidden symbol, to match libgcc.

Sterling Augustine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 10:10:41 PDT 2019


saugustine updated this revision to Diff 191523.
saugustine marked 2 inline comments as done.
saugustine added a comment.

Make __cpu_model a hidden symbol, to match libgcc.
Also __cpu_features2 and __cpu_indicator_init.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59561

Files:
  compiler-rt/lib/builtins/cpu_model.c


Index: compiler-rt/lib/builtins/cpu_model.c
===================================================================
--- compiler-rt/lib/builtins/cpu_model.c
+++ compiler-rt/lib/builtins/cpu_model.c
@@ -592,14 +592,24 @@
 #define CONSTRUCTOR_ATTRIBUTE
 #endif
 
+#ifndef _WIN32
+__attribute__((visibility("hidden")))
+#endif
 int __cpu_indicator_init(void) CONSTRUCTOR_ATTRIBUTE;
 
+#ifndef _WIN32
+__attribute__((visibility("hidden")))
+#endif
 struct __processor_model {
   unsigned int __cpu_vendor;
   unsigned int __cpu_type;
   unsigned int __cpu_subtype;
   unsigned int __cpu_features[1];
 } __cpu_model = {0, 0, 0, {0}};
+
+#ifndef _WIN32
+__attribute__((visibility("hidden")))
+#endif
 unsigned int __cpu_features2;
 
 /* A constructor function that is sets __cpu_model and __cpu_features2 with


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59561.191523.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190320/135dcaa0/attachment.bin>


More information about the llvm-commits mailing list