From: Chris Lattner Date: Mon, 15 Jul 2002 00:10:33 +0000 (+0000) Subject: Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5659dd1af838b787199271c5c47488c31953ac18;p=oota-llvm.git Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2907 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index c81ac34eb8f..a26ea80c815 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1198,6 +1198,11 @@ FunctionHeaderH : OptInternal TypesV FuncName '(' ArgList ')' { if (!CurMeth.isDeclare && !M->isExternal()) ThrowException("Redefinition of function '" + FunctionName + "'!"); + // Make sure that we keep track of the internal marker, even if there was + // a previous "declare". + if ($1) + M->setInternalLinkage(true); + // If we found a preexisting function prototype, remove it from the // module, so that we don't get spurious conflicts with global & local // variables.