[llvm-branch-commits] [llvm-branch] r182149 - Merging r181864:

Bill Wendling isanbard at gmail.com
Fri May 17 11:51:33 PDT 2013


Author: void
Date: Fri May 17 13:51:33 2013
New Revision: 182149

URL: http://llvm.org/viewvc/llvm-project?rev=182149&view=rev
Log:
Merging r181864:
------------------------------------------------------------------------
r181864 | chapuni | 2013-05-14 19:16:23 -0700 (Tue, 14 May 2013) | 10 lines

ELFRelocationEntry::operator<(): Try to stabilize the order. r_offset was insufficient to sort Relocs.

It should fix llvm/test/CodeGen/ARM/ehabi-mc-compact-pr*.ll on some hosts.

  RELOCATION RECORDS FOR [.ARM.exidx]:
  0 R_ARM_PREL31 .text
  0 R_ARM_NONE __aeabi_unwind_cpp_pr0

FIXME: I am not sure of the directions of extra comparators, in Type and Index.
For now, they are different from the direction in r_offset.
------------------------------------------------------------------------

Modified:
    llvm/branches/release_33/   (props changed)
    llvm/branches/release_33/include/llvm/MC/MCELFObjectWriter.h

Propchange: llvm/branches/release_33/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 17 13:51:33 2013
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,181286,181296,181313,181397,181423,181450,181524,181529,181540,181576-181580,181586,181600,181678,181706,181792,181800,181842,182072
+/llvm/trunk:155241,181286,181296,181313,181397,181423,181450,181524,181529,181540,181576-181580,181586,181600,181678,181706,181792,181800,181842,181864,182072

Modified: llvm/branches/release_33/include/llvm/MC/MCELFObjectWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_33/include/llvm/MC/MCELFObjectWriter.h?rev=182149&r1=182148&r2=182149&view=diff
==============================================================================
--- llvm/branches/release_33/include/llvm/MC/MCELFObjectWriter.h (original)
+++ llvm/branches/release_33/include/llvm/MC/MCELFObjectWriter.h Fri May 17 13:51:33 2013
@@ -45,7 +45,14 @@ struct ELFRelocationEntry {
 
   // Support lexicographic sorting.
   bool operator<(const ELFRelocationEntry &RE) const {
-    return RE.r_offset < r_offset;
+    if (RE.r_offset != r_offset)
+      return RE.r_offset < r_offset;
+    if (Type != RE.Type)
+      return Type < RE.Type;
+    if (Index != RE.Index)
+      return Index < RE.Index;
+    llvm_unreachable("ELFRelocs might be unstable!");
+    return 0;
   }
 };
 





More information about the llvm-branch-commits mailing list