[lld] r262219 - Remove bogus assert.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 29 05:46:39 PST 2016
Author: rafael
Date: Mon Feb 29 07:46:39 2016
New Revision: 262219
URL: http://llvm.org/viewvc/llvm-project?rev=262219&view=rev
Log:
Remove bogus assert.
Added:
lld/trunk/test/ELF/lto/undef.ll
Modified:
lld/trunk/ELF/SymbolTable.cpp
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=262219&r1=262218&r2=262219&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Mon Feb 29 07:46:39 2016
@@ -155,7 +155,6 @@ template <class ELFT> void SymbolTable<E
Obj->parse(ComdatGroups);
for (SymbolBody *Body : Obj->getSymbols()) {
Symbol *Sym = insert(Body);
- assert(isa<DefinedBitcode>(Sym->Body));
Sym->Body = Body;
}
}
Added: lld/trunk/test/ELF/lto/undef.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/undef.ll?rev=262219&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/undef.ll (added)
+++ lld/trunk/test/ELF/lto/undef.ll Mon Feb 29 07:46:39 2016
@@ -0,0 +1,20 @@
+; REQUIRES: x86
+; RUN: llvm-as %s -o %t.o
+; RUN: ld.lld -m elf_x86_64 %t.o -o %t.so -shared
+; RUN: llvm-readobj -t %t.so | FileCheck %s
+target triple = "x86_64-unknown-linux-gnu"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+declare void @bar()
+define void @foo() {
+ call void @bar()
+ ret void
+}
+
+; CHECK: Name: bar
+; CHECK-NEXT: Value: 0x0
+; CHECK-NEXT: Size: 0
+; CHECK-NEXT: Binding: Global
+; CHECK-NEXT: Type: None
+; CHECK-NEXT: Other: 0
+; CHECK-NEXT: Section: Undefined
More information about the llvm-commits
mailing list