summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Object/ELF.cpp3
-rw-r--r--llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index dd8f3a9f331..d5d98126343 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -438,6 +438,7 @@ std::string ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
#include "llvm/BinaryFormat/DynamicTags.def"
#undef HEXAGON_DYNAMIC_TAG
}
+ break;
case ELF::EM_MIPS:
switch (Type) {
@@ -445,6 +446,7 @@ std::string ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
#include "llvm/BinaryFormat/DynamicTags.def"
#undef MIPS_DYNAMIC_TAG
}
+ break;
case ELF::EM_PPC64:
switch (Type) {
@@ -452,6 +454,7 @@ std::string ELFFile<ELFT>::getDynamicTagAsString(unsigned Arch,
#include "llvm/BinaryFormat/DynamicTags.def"
#undef PPC64_DYNAMIC_TAG
}
+ break;
}
#undef DYNAMIC_TAG
switch (Type) {
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
index 910a9fcc3c3..8b6262ec22f 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
@@ -113,6 +113,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case RT64_8:
return IsPCRel ? ELF::R_X86_64_PC8 : ELF::R_X86_64_8;
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_GOT:
switch (Type) {
case RT64_64:
@@ -124,6 +125,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case RT64_8:
llvm_unreachable("Unimplemented");
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_GOTOFF:
assert(Type == RT64_64);
assert(!IsPCRel);
@@ -140,6 +142,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case RT64_8:
llvm_unreachable("Unimplemented");
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_DTPOFF:
assert(!IsPCRel);
switch (Type) {
@@ -152,6 +155,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case RT64_8:
llvm_unreachable("Unimplemented");
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_SIZE:
assert(!IsPCRel);
switch (Type) {
@@ -164,6 +168,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case RT64_8:
llvm_unreachable("Unimplemented");
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_TLSCALL:
return ELF::R_X86_64_TLSDESC_CALL;
case MCSymbolRefExpr::VK_TLSDESC:
@@ -196,6 +201,7 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case X86::reloc_riprel_4byte_movq_load:
return ELF::R_X86_64_REX_GOTPCRELX;
}
+ llvm_unreachable("unexpected relocation type!");
}
}
@@ -233,6 +239,7 @@ static unsigned getRelocType32(MCContext &Ctx,
case RT32_8:
return IsPCRel ? ELF::R_386_PC8 : ELF::R_386_8;
}
+ llvm_unreachable("unexpected relocation type!");
case MCSymbolRefExpr::VK_GOT:
assert(Type == RT32_32);
if (IsPCRel)
OpenPOWER on IntegriCloud