[llvm-commits] [llvm] r122377 - /llvm/trunk/lib/MC/MachObjectWriter.cpp
Matt Beaumont-Gay
matthewbg at google.com
Tue Dec 21 15:43:23 PST 2010
Author: matthewbg
Date: Tue Dec 21 17:43:23 2010
New Revision: 122377
URL: http://llvm.org/viewvc/llvm-project?rev=122377&view=rev
Log:
GCC objects to the two sides of a conditional expression having different enum
types, but they're just getting converted to unsigned anyway, so cast first
(and ask questions later).
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=122377&r1=122376&r2=122377&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Tue Dec 21 17:43:23 2010
@@ -765,8 +765,8 @@
// Note that there is no longer any semantic difference between these two
// relocation types from the linkers point of view, this is done solely
// for pedantic compatibility with 'as'.
- Type = A_SD->isExternal() ? macho::RIT_Difference :
- macho::RIT_Generic_LocalDifference;
+ Type = A_SD->isExternal() ? (unsigned)macho::RIT_Difference :
+ (unsigned)macho::RIT_Generic_LocalDifference;
Value2 = getSymbolAddress(B_SD, Layout);
FixedValue -= getSectionAddress(B_SD->getFragment()->getParent());
}
More information about the llvm-commits
mailing list