[PATCH] D76162: [AIX] discard the label in the csect of function description and use qualname for linkage
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 25 09:43:32 PDT 2020
DiggerLin added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1740
+ getObjFileLowering().getSectionForFunctionDescriptor(
+ dyn_cast<const Function>(GO)))
->getQualNameSymbol();
----------------
jasonliu wrote:
> DiggerLin wrote:
> > jasonliu wrote:
> > > Why do we use dyn_cast? Is there a chance GO is not a Function when we gets here?
> > getSectionForFunctionDescriptor(Function*) , but GO is GlobalObject.
> Let me rephrase my question, could you use `cast` instead of `dyn_cast`?
OK
================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1550
+ CurrentFnDescSym = FnDescSec->getQualNameSymbol();
cast<MCSymbolXCOFF>(CurrentFnDescSym)->setContainingCsect(FnDescSec);
----------------
jasonliu wrote:
> This line could be removed, as the symbol returned from getQualNameSymbol() should already have its csect set.
thanks
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