Skip to content

Commit

Permalink
Make __cpu_model a hidden symbol, to match libgcc.
Browse files Browse the repository at this point in the history
Also hide __cpu_inicator_init and __cpu_features2
for similar reasons.

Summary: Make __cpu_model a hidden symbol, to match libgcc.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59561

llvm-svn: 356581
  • Loading branch information
Sterling-Augustine committed Mar 20, 2019
1 parent 140f766 commit 86724e4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions compiler-rt/lib/builtins/cpu_model.c
Expand Up @@ -592,14 +592,24 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf,
#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
Expand Down

0 comments on commit 86724e4

Please sign in to comment.