It causes MSVC 2015 to emit "C4307: '-': integral constant overflow" warning
Differential Revision: https://reviews.llvm.org/D38955
llvm-svn: 315926
Name = Name.take_front(Pos);
auto P = Symtab.insert(
- {CachedHashStringRef(Name), SymIndex{(int)SymVector.size(), false}});
+ {CachedHashStringRef(Name), SymIndex((int)SymVector.size(), false)});
SymIndex &V = P.first->second;
bool IsNew = P.second;
if (V.Idx == -1) {
IsNew = true;
- V = SymIndex{(int)SymVector.size(), true};
+ V = SymIndex((int)SymVector.size(), true);
}
Symbol *Sym;
void assignWildcardVersion(SymbolVersion Ver, uint16_t VersionId);
struct SymIndex {
- int32_t Idx : 31;
- uint32_t Traced : 1;
+ SymIndex(int Idx, bool Traced) : Idx(Idx), Traced(Traced) {}
+ int Idx : 31;
+ unsigned Traced : 1;
};
// The order the global symbols are in is not defined. We can use an arbitrary