[lld] r254649 - Fix style by sorting switch-cases.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 12:59:51 PST 2015


Author: ruiu
Date: Thu Dec  3 14:59:51 2015
New Revision: 254649

URL: http://llvm.org/viewvc/llvm-project?rev=254649&view=rev
Log:
Fix style by sorting switch-cases.

Modified:
    lld/trunk/ELF/Target.cpp

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=254649&r1=254648&r2=254649&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Thu Dec  3 14:59:51 2015
@@ -1099,6 +1099,14 @@ void MipsTargetInfo<ELFT>::relocateOne(u
   case R_MIPS_32:
     add32<E>(Loc, SA);
     break;
+  case R_MIPS_CALL16:
+  case R_MIPS_GOT16: {
+    int64_t V = SA - getMipsGpAddr<ELFT>();
+    if (Type == R_MIPS_GOT16)
+      checkInt<16>(V, Type);
+    write32<E>(Loc, (read32<E>(Loc) & 0xffff0000) | (V & 0xffff));
+    break;
+  }
   case R_MIPS_HI16: {
     uint32_t Instr = read32<E>(Loc);
     if (PairedLoc) {
@@ -1117,14 +1125,6 @@ void MipsTargetInfo<ELFT>::relocateOne(u
     write32<E>(Loc, (Instr & 0xffff0000) | ((SA + AHL) & 0xffff));
     break;
   }
-  case R_MIPS_CALL16:
-  case R_MIPS_GOT16: {
-    int64_t V = SA - getMipsGpAddr<ELFT>();
-    if (Type == R_MIPS_GOT16)
-      checkInt<16>(V, Type);
-    write32<E>(Loc, (read32<E>(Loc) & 0xffff0000) | (V & 0xffff));
-    break;
-  }
   default:
     error("unrecognized reloc " + Twine(Type));
   }




More information about the llvm-commits mailing list