[PATCH] Update ARM and x86 ArchHandler to match 64bits counterparts. NFC

Jean-Daniel Dupas mailing at xenonium.com
Fri Feb 13 07:07:31 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/ReaderWriter/MachO/ArchHandler_arm.cpp:916
@@ -914,3 +915,3 @@
   uint32_t value32;
-  switch (ref.kindValue()) {
+  switch (static_cast<Arm_Kinds>(ref.kindValue())) {
   case modeThumbCode:
----------------
Jean-Daniel wrote:
> shankarke wrote:
> > There is an assert at line 911, that takes care of making sure all the kinds are specific to ARM, no ?
> assert are runtime error and are not a replacement for proper compile time warning IMHO.
Sorry I misread the comment. 
The assert check the reference kind family, but it does not guarantee that the following switch has a case to handle it. The problem is when we add new reference kinds, we want to make sure that they are properly handled in all switch() statements.

http://reviews.llvm.org/D7612

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list