summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp10
-rw-r--r--llvm/lib/MC/MCSectionXCOFF.cpp2
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp10
3 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index a3bf69ae4ef..ac7c4c50ae4 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1826,7 +1826,7 @@ MCSection *TargetLoweringObjectFileWasm::getStaticDtorSection(
//===----------------------------------------------------------------------===//
MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(
const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
- llvm_unreachable("XCOFF explicit sections not yet implemented.");
+ report_fatal_error("XCOFF explicit sections not yet implemented.");
}
MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
@@ -1851,7 +1851,7 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
bool TargetLoweringObjectFileXCOFF::shouldPutJumpTableInFunctionSection(
bool UsesLabelDifference, const Function &F) const {
- llvm_unreachable("TLOF XCOFF not yet implemented.");
+ report_fatal_error("TLOF XCOFF not yet implemented.");
}
void TargetLoweringObjectFileXCOFF::Initialize(MCContext &Ctx,
@@ -1864,16 +1864,16 @@ void TargetLoweringObjectFileXCOFF::Initialize(MCContext &Ctx,
MCSection *TargetLoweringObjectFileXCOFF::getStaticCtorSection(
unsigned Priority, const MCSymbol *KeySym) const {
- llvm_unreachable("XCOFF ctor section not yet implemented.");
+ report_fatal_error("XCOFF ctor section not yet implemented.");
}
MCSection *TargetLoweringObjectFileXCOFF::getStaticDtorSection(
unsigned Priority, const MCSymbol *KeySym) const {
- llvm_unreachable("XCOFF dtor section not yet implemented.");
+ report_fatal_error("XCOFF dtor section not yet implemented.");
}
const MCExpr *TargetLoweringObjectFileXCOFF::lowerRelativeReference(
const GlobalValue *LHS, const GlobalValue *RHS,
const TargetMachine &TM) const {
- llvm_unreachable("XCOFF not yet implemented.");
+ report_fatal_error("XCOFF not yet implemented.");
}
diff --git a/llvm/lib/MC/MCSectionXCOFF.cpp b/llvm/lib/MC/MCSectionXCOFF.cpp
index 740365f0476..9cee1cc11e4 100644
--- a/llvm/lib/MC/MCSectionXCOFF.cpp
+++ b/llvm/lib/MC/MCSectionXCOFF.cpp
@@ -32,7 +32,7 @@ void MCSectionXCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
if (getMappingClass() != XCOFF::XMC_RW)
llvm_unreachable("Unsupported storage-mapping class for common csect");
if (getCSectType() != XCOFF::XTY_CM)
- llvm_unreachable("wrong csect type for common csect");
+ llvm_unreachable("wrong csect type for .bss csect");
// Don't have to print a directive for switching to section for commons.
// '.comm' and '.lcomm' directives for the variable will create the needed
// csect.
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 237c8da1095..890a0dd3521 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -1656,20 +1656,20 @@ void PPCAIXAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
report_fatal_error("Custom section for Data not yet supported.");
if (GV->hasComdat())
- report_fatal_error("COMDAT not yet supported on AIX.");
+ report_fatal_error("COMDAT not yet supported by AIX.");
SectionKind GVKind = getObjFileLowering().getKindForGlobal(GV, TM);
if (!GVKind.isCommon())
- report_fatal_error("Only common variables are supported on AIX.");
+ report_fatal_error("Only common variables are supported on AIX for now.");
// Create the containing csect and switch to it.
- MCSectionXCOFF *CSect = dyn_cast<MCSectionXCOFF>(
+ MCSectionXCOFF *CSect = cast<MCSectionXCOFF>(
getObjFileLowering().SectionForGlobal(GV, GVKind, TM));
OutStreamer->SwitchSection(CSect);
// Create the symbol and emit it.
- MCSymbolXCOFF *XSym = dyn_cast<MCSymbolXCOFF>(getSymbol(GV));
- auto DL = GV->getParent()->getDataLayout();
+ MCSymbolXCOFF *XSym = cast<MCSymbolXCOFF>(getSymbol(GV));
+ const DataLayout &DL = GV->getParent()->getDataLayout();
unsigned Align =
GV->getAlignment() ? GV->getAlignment() : DL.getPreferredAlignment(GV);
uint64_t Size = DL.getTypeAllocSize(GV->getType()->getElementType());
OpenPOWER on IntegriCloud