From ea9285e6430696a0f8a1dfe59d2ade0c2df8b9e5 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. llvm-svn: 55962 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 6d3d133930eb..273253ae23c6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/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';