Fix bug: test/Regression/Assembler/2002-07-14-InternalLossage.llx
authorChris Lattner <sabre@nondot.org>
Mon, 15 Jul 2002 00:10:33 +0000 (00:10 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Jul 2002 00:10:33 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2907 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index c81ac34eb8f2b07944b30fc2d550277fab10d7b0..a26ea80c8150afa9e6d5e4ef270405f59639e8d6 100644 (file)
@@ -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.