[lld] r244632 - Use real values for DefindeFirst and DefinedLast.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 10:10:02 PDT 2015
Author: rafael
Date: Tue Aug 11 12:10:02 2015
New Revision: 244632
URL: http://llvm.org/viewvc/llvm-project?rev=244632&view=rev
Log:
Use real values for DefindeFirst and DefinedLast.
With this clang notices that switches are fully covered.
Modified:
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=244632&r1=244631&r2=244632&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Tue Aug 11 12:10:02 2015
@@ -44,9 +44,8 @@ int SymbolBody::compare(SymbolBody *Othe
return 0;
case UndefinedKind:
return 1;
- default:
- llvm_unreachable("unknown symbol kind");
}
+ llvm_unreachable("unknown symbol kind");
}
namespace lld {
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=244632&r1=244631&r2=244632&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Tue Aug 11 12:10:02 2015
@@ -35,10 +35,10 @@ struct Symbol {
class SymbolBody {
public:
enum Kind {
- DefinedFirst,
- DefinedRegularKind,
- DefinedLast,
- UndefinedKind,
+ DefinedFirst = 0,
+ DefinedRegularKind = 0,
+ DefinedLast = 0,
+ UndefinedKind = 1,
};
Kind kind() const { return static_cast<Kind>(SymbolKind); }
More information about the llvm-commits
mailing list