Trying to figure out why it fails on a bot but passes locally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254344
91177308-0d34-0410-b5e6-
96231b3b80d8
if (isPerformingImport() && !doImportAsDefinition(Old))
return;
- if (DoNotLinkFromSource.count(Old)) {
- if (!New->hasExternalLinkage() && !New->hasExternalWeakLinkage() &&
- !New->hasAppendingLinkage())
- emitError("Declaration points to discarded value");
+ if (DoNotLinkFromSource.count(Old))
return;
- }
linkGlobalValueBody(*Old);
}
+++ /dev/null
-$foo = comdat any
-@foo = global i8 1, comdat
-define void @zed() {
- call void @bar()
- ret void
-}
-define internal void @bar() comdat($foo) {
- ret void
-}
+++ /dev/null
-; RUN: not llvm-link -S %s %p/Inputs/comdat13.ll -o %t.ll 2>&1 | FileCheck %s
-
-; In Inputs/comdat13.ll a function not in the $foo comdat (zed) references an
-; internal function in the comdat $foo.
-; We might want to have the verifier reject that, but for now we at least check
-; that the linker produces an error.
-; This is the IR equivalent of the "relocation refers to discarded section" in
-; an ELF linker.
-
-; CHECK: Declaration points to discarded value
-
-$foo = comdat any
-@foo = global i8 0, comdat