From: Dale Johannesen Date: Mon, 8 Sep 2008 21:21:49 +0000 (+0000) Subject: Don't suppress no-dead-strip for used static functions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=14b0a2b13705d47916b6ea7e2d7c0db898a0fb81;p=oota-llvm.git 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 --- 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';