From ec5e627e56311fcf56f4032b781df0f321fd3fff Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 6 Oct 2011 13:32:20 -0700 Subject: [PATCH] Mark internal stdlib functions as "internal" linkage, not "private". This fixes print() statements on OSX. (http://llvm.org/bugs/show_bug.cgi?id=11080) --- opt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt.cpp b/opt.cpp index fd4f1709..40db371f 100644 --- a/opt.cpp +++ b/opt.cpp @@ -2601,7 +2601,7 @@ MakeInternalFuncsStaticPass::runOnModule(llvm::Module &module) { for (int i = 0; i < count; ++i) { llvm::Function *f = m->module->getFunction(names[i]); if (f != NULL) { - f->setLinkage(llvm::GlobalValue::PrivateLinkage); + f->setLinkage(llvm::GlobalValue::InternalLinkage); modifiedAny = true; } }