aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2010-12-21 23:43:23 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2010-12-21 23:43:23 +0000
commit890cb2d5061c6fe1d6b463def27f407030dc2178 (patch)
tree86dc33912a2d65c34d181178e64577efdd7140a9 /llvm/lib/MC/MachObjectWriter.cpp
parent12470778d7cb50fcfff22cf5851d5717f7261b6d (diff)
downloadllvm-890cb2d5061c6fe1d6b463def27f407030dc2178.zip
llvm-890cb2d5061c6fe1d6b463def27f407030dc2178.tar.gz
llvm-890cb2d5061c6fe1d6b463def27f407030dc2178.tar.bz2
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). llvm-svn: 122377
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index 3a15d24..386f451 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -765,8 +765,8 @@ public:
// 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());
}