[PATCH] D76162: [AIX] discard the label in the csect of function description and use qualname for linkage
Jason Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 11:16:56 PDT 2020
jasonliu added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1974
+ SmallString<128> NameStr;
+ getMangler().getNameWithPrefix(NameStr, F, /*CannotUsePrivateLabel=*/false);
+ return getContext().getXCOFFSection(
----------------
Looking at what other XCOFF function is doing in this file, I think we should be consistent with them for easier maintenance which means we should call
```
getNameWithPrefix(Name, GO, TM);
```
instead.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1976
+ return getContext().getXCOFFSection(
+ NameStr.str(), XCOFF::XMC_DS, XCOFF::XTY_SD, getStorageClassForGlobal(F),
+ SectionKind::getData());
----------------
NameStr is good. I don't think you need to call .str().
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1740
+ getObjFileLowering().getSectionForFunctionDescriptor(
+ dyn_cast<const Function>(GO)))
->getQualNameSymbol();
----------------
Why do we use dyn_cast? Is there a chance GO is not a Function when we gets here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76162/new/
https://reviews.llvm.org/D76162
More information about the llvm-commits
mailing list