[lld] r315926 - Revert r315877: Simplify.
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 11:49:28 PDT 2017
Author: kzhuravl
Date: Mon Oct 16 11:49:28 2017
New Revision: 315926
URL: http://llvm.org/viewvc/llvm-project?rev=315926&view=rev
Log:
Revert r315877: Simplify.
It causes MSVC 2015 to emit "C4307: '-': integral constant overflow" warning
Differential Revision: https://reviews.llvm.org/D38955
Modified:
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=315926&r1=315925&r2=315926&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Mon Oct 16 11:49:28 2017
@@ -240,13 +240,13 @@ std::pair<Symbol *, bool> SymbolTable::i
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;
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=315926&r1=315925&r2=315926&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Mon Oct 16 11:49:28 2017
@@ -103,8 +103,9 @@ private:
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
More information about the llvm-commits
mailing list