1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

ModuleSummaryIndex: Avoid enum bitfields for MSVC portability

Enum bitfields have crazy portability issues with MSVC.  Use unsigned
instead of LinkageTypes here in the ModuleSummaryIndex to address
Takumi's concerns from r267335.

llvm-svn: 267342
This commit is contained in:
Duncan P. N. Exon Smith 2016-04-24 14:25:37 +00:00
parent 14807bb76b
commit 9a22e0f76e

View File

@ -101,7 +101,7 @@ public:
/// index, to disambiguate from other values with the same name. /// index, to disambiguate from other values with the same name.
/// In the future this will be used to update and optimize linkage /// In the future this will be used to update and optimize linkage
/// types based on global summary-based analysis. /// types based on global summary-based analysis.
GlobalValue::LinkageTypes Linkage : 4; unsigned Linkage : 4;
/// Indicate if the global value is located in a specific section. /// Indicate if the global value is located in a specific section.
unsigned HasSection : 1; unsigned HasSection : 1;
@ -167,7 +167,9 @@ public:
GVFlags flags() { return Flags; } GVFlags flags() { return Flags; }
/// Return linkage type recorded for this global value. /// Return linkage type recorded for this global value.
GlobalValue::LinkageTypes linkage() const { return Flags.Linkage; } GlobalValue::LinkageTypes linkage() const {
return static_cast<GlobalValue::LinkageTypes>(Flags.Linkage);
}
/// Return true if this global value is located in a specific section. /// Return true if this global value is located in a specific section.
bool hasSection() const { return Flags.HasSection; } bool hasSection() const { return Flags.HasSection; }