This is an archive of the discontinued LLVM Phabricator instance.

[NFC][XCOFF][AIX] Return function entry point symbol with dedicate function
ClosedPublic

Authored by jasonliu on May 21 2020, 1:18 PM.

Details

Summary

Use getFunctionEntryPointSymbol whenever possible to enclose the implementation detail and reduce duplicate logic.

Diff Detail

Event Timeline

jasonliu created this revision.May 21 2020, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2020, 1:18 PM
DiggerLin marked an inline comment as done.May 26 2020, 7:15 AM
DiggerLin added inline comments.
llvm/include/llvm/Target/TargetLoweringObjectFile.h
250

the code should be never come to here. maybe report an fatal error maybe better.

jasonliu marked an inline comment as done.May 26 2020, 8:07 AM
jasonliu added inline comments.
llvm/include/llvm/Target/TargetLoweringObjectFile.h
250

Current code won't come here. But I think returning a nullptr have more benefit than just report_fatal_error. Sometimes, we could write code that relying on it being return nulltpr on Targets that does not support it (instead of relying on target query).

This revision is now accepted and ready to land.May 26 2020, 10:25 AM
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
2156

I think getNameWithPrefix appends, meaning that NameStr.push_back('.') before calling it will do what we need without using operator+ below.

jasonliu updated this revision to Diff 266326.May 26 2020, 1:48 PM

Use push_back instead of operator+.

jasonliu marked an inline comment as done.May 26 2020, 1:48 PM
This revision was automatically updated to reflect the committed changes.