summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-07-30 15:37:01 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-07-30 15:37:01 +0000
commit39f35038140d2e21023eefcc7acc65c5b68fc77f (patch)
treea802eef10fcbd462c2dcc26f4534f988c600898b /llvm/lib/Target/PowerPC
parent027bb52790ed825788806799f6b7391e2f17c2c1 (diff)
downloadbcm5719-llvm-39f35038140d2e21023eefcc7acc65c5b68fc77f.tar.gz
bcm5719-llvm-39f35038140d2e21023eefcc7acc65c5b68fc77f.zip
Address post commit review comments on revision 366727.
Addresses number of comment made on D64652 after commiting: - Reorders function decls in the TargetLoweringObjectFileXCOFF class. - Fix comment in MCSectionXCOFF to include description of external reference csects. - Convert several llvm_unreachables to report_fatal_error - Convert several dyn_casts to casts as they are expected not to fail. - Avoid copying DataLayout object. llvm-svn: 367324
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp10
1 files changed, 5 insertions, 5 deletions
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