[lld] r288686 - Include object file name to an error message.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 10:40:14 PST 2016
Author: ruiu
Date: Mon Dec 5 12:40:14 2016
New Revision: 288686
URL: http://llvm.org/viewvc/llvm-project?rev=288686&view=rev
Log:
Include object file name to an error message.
Added:
lld/trunk/test/ELF/version-symbol-error.s
Modified:
lld/trunk/ELF/Symbols.cpp
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=288686&r1=288685&r2=288686&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Mon Dec 5 12:40:14 2016
@@ -213,7 +213,7 @@ void SymbolBody::parseSymbolVersion() {
}
// It is an error if the specified version is not defined.
- error("symbol " + S + " has undefined version " + Verstr);
+ error(toString(File) + ": symbol " + S + " has undefined version " + Verstr);
}
Defined::Defined(Kind K, StringRefZ Name, bool IsLocal, uint8_t StOther,
Added: lld/trunk/test/ELF/version-symbol-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/version-symbol-error.s?rev=288686&view=auto
==============================================================================
--- lld/trunk/test/ELF/version-symbol-error.s (added)
+++ lld/trunk/test/ELF/version-symbol-error.s Mon Dec 5 12:40:14 2016
@@ -0,0 +1,12 @@
+// REQUIRES: x86
+// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+// RUN: echo "V1 {};" > %t.script
+// RUN: not ld.lld -shared -version-script=%t.script %t.o -o %t.so 2>&1 \
+// RUN: | FileCheck %s
+
+// CHECK: .o: symbol foo at V2 has undefined version V2
+
+.globl foo at V2
+.text
+foo at V2:
+ ret
More information about the llvm-commits
mailing list