[PATCH] D84765: [AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations
Jason Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 12:37:09 PDT 2020
jasonliu added inline comments.
================
Comment at: llvm/include/llvm/MC/MCSectionXCOFF.h:66
XCOFF::StorageMappingClass getMappingClass() const { return MappingClass; }
- XCOFF::StorageClass getStorageClass() const { return StorageClass; }
+ XCOFF::StorageClass getStorageClass() const { return QualName->getStorageClass(); }
XCOFF::SymbolType getCSectType() const { return Type; }
----------------
Please try to address all the clang-format/clang-tidy message.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5171
// entry point, which is named by prepending a "." before the function's
- // C-linkage name.
- const auto getFunctionEntryPointSymbol = [&](StringRef SymName) {
+ // C-linkage name and storage mapping classs[PR].
+ const auto getFunctionEntryPointQualNameSymbol = [&](StringRef SymName) {
----------------
Suggestion for the comment:
...... C-linkage name. A Qualname is returned here because an external function entry point is a csect with XTY_ER property.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5172
+ // C-linkage name and storage mapping classs[PR].
+ const auto getFunctionEntryPointQualNameSymbol = [&](StringRef SymName) {
auto &Context = DAG.getMachineFunction().getMMI().getContext();
----------------
DiggerLin wrote:
> jasonliu wrote:
> > I don't think it's necessary to change the name, as the sister function in TLOF have the same name but still return qualname when needed.
> MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol() return .foo not .foo[PR] .
> in order to not to confuse ,I use the name getFunctionEntryPointQualNameSymbol() to get .foo[PR]
>
By looking at what this function does. It seems the name should be `getExternalFunctionEntryPointSymbol`, as it's always returning a function entry point to an external function. That's an important information that we should include in the name.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84765/new/
https://reviews.llvm.org/D84765
More information about the llvm-commits
mailing list