From faaa5532749f4445dd6a02ad3be13472aaeae235 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 19 Feb 2014 01:28:30 +0000 Subject: Avoid an infinite cycle with private linkage and -f{data|function}-sections. When outputting an object we check its section to find its name, but when looking for the section with -ffunction-section we look for the symbol name. Break the loop by requesting a name with the private prefix when constructing the section name. This matches the behavior before r201608. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201622 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index d9db22ba1e..155bb0a7a5 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -1338,7 +1338,7 @@ public: } void getNameWithPrefix(SmallVectorImpl &Name, const GlobalValue *GV, - Mangler &Mang) const; + Mangler &Mang, bool MayAlwaysUsePrivate = false) const; MCSymbol *getSymbol(const GlobalValue *GV, Mangler &Mang) const; private: -- cgit v1.2.3