From 8d9ff2318530d91be04ccced107c3ef04ba2255f Mon Sep 17 00:00:00 2001 From: jasonliu Date: Wed, 27 May 2020 17:52:21 +0000 Subject: [NFC][XCOFF][AIX] Return function entry point symbol with dedicate function Use getFunctionEntryPointSymbol whenever possible to enclose the implementation detail and reduce duplicate logic. Differential Revision: https://reviews.llvm.org/D80402 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 38a0223688ba..586de4fd97f0 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -2150,6 +2150,14 @@ XCOFF::StorageClass TargetLoweringObjectFileXCOFF::getStorageClassForGlobal( llvm_unreachable("Unknown linkage type!"); } +MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol( + const Function *F, const TargetMachine &TM) const { + SmallString<128> NameStr; + NameStr.push_back('.'); + getNameWithPrefix(NameStr, F, TM); + return getContext().getOrCreateSymbol(NameStr); +} + MCSection *TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor( const Function *F, const TargetMachine &TM) const { SmallString<128> NameStr; -- cgit v1.2.3