diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-24 14:25:37 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-24 14:25:37 +0000 |
| commit | a425bbbfb871e44d515a59543eb5b226a689d20c (patch) | |
| tree | 47c18ce811dec66c3895dfe108231d3e04af26b3 | |
| parent | f265dae1a323383a9308d4602f4c255248d18ac2 (diff) | |
| download | bcm5719-llvm-a425bbbfb871e44d515a59543eb5b226a689d20c.tar.gz bcm5719-llvm-a425bbbfb871e44d515a59543eb5b226a689d20c.zip | |
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
| -rw-r--r-- | llvm/include/llvm/IR/ModuleSummaryIndex.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h index ccb2a253a3b..6988615f4ed 100644 --- a/llvm/include/llvm/IR/ModuleSummaryIndex.h +++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h @@ -101,7 +101,7 @@ public: /// index, to disambiguate from other values with the same name. /// In the future this will be used to update and optimize linkage /// 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. unsigned HasSection : 1; @@ -167,7 +167,9 @@ public: GVFlags flags() { return Flags; } /// 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. bool hasSection() const { return Flags.HasSection; } |

