Don't suppress no-dead-strip for used static functions.
authorDale Johannesen <dalej@apple.com>
Mon, 8 Sep 2008 21:21:49 +0000 (21:21 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 8 Sep 2008 21:21:49 +0000 (21:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55962 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 6d3d133930ebea90ec582798952c1e2c5ad10d3d..273253ae23c676dcefe761421c776e56281e7e7a 100644 (file)
@@ -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<Function>(GV))) {
       O << Directive;
       EmitConstantValueOnly(InitList->getOperand(i));
       O << '\n';