Disable a consistency check.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 30 Nov 2015 23:05:25 +0000 (23:05 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 30 Nov 2015 23:05:25 +0000 (23:05 +0000)
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

lib/Linker/LinkModules.cpp
test/Linker/Inputs/comdat13.ll [deleted file]
test/Linker/comdat13.ll [deleted file]

index aeaa7eb90903b64cc65daf3e2feeff2c507299e1..edee55a1f9f65fc50ea54142bce1f7d010da37d2 100644 (file)
@@ -940,12 +940,8 @@ void ModuleLinker::materializeInitFor(GlobalValue *New, GlobalValue *Old) {
   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);
 }
diff --git a/test/Linker/Inputs/comdat13.ll b/test/Linker/Inputs/comdat13.ll
deleted file mode 100644 (file)
index a2d16bd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-$foo = comdat any
-@foo = global i8 1, comdat
-define void @zed() {
-  call void @bar()
-  ret void
-}
-define internal void @bar() comdat($foo) {
-  ret void
-}
diff --git a/test/Linker/comdat13.ll b/test/Linker/comdat13.ll
deleted file mode 100644 (file)
index a8e51f0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-; 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