From 14b0a2b13705d47916b6ea7e2d7c0db898a0fb81 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Mon, 8 Sep 2008 21:21:49 +0000 Subject: [PATCH] Don't suppress no-dead-strip for used static functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55962 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 6d3d133930e..273253ae23c 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -462,7 +462,7 @@ void AsmPrinter::EmitLLVMUsedList(Constant *List) { for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) { const GlobalValue *GV = findGlobalValue(InitList->getOperand(i)); - if (GV && !GV->hasInternalLinkage()) { + if (GV && (!GV->hasInternalLinkage() || isa(GV))) { O << Directive; EmitConstantValueOnly(InitList->getOperand(i)); O << '\n'; -- 2.34.1