[PATCH] D13169: [ELF2] - Implemented --allow-multiple-definition flag
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 02:25:21 PDT 2015
grimar added inline comments.
================
Comment at: ELF/SymbolTable.cpp:153-160
@@ -152,5 +152,10 @@
- error(Twine("duplicate symbol: ") + Old.getName() + " in " +
- OldFile->getName() + " and " + NewFile->getName());
+ std::string Msg = (Twine("duplicate symbol: ") + Old.getName() + " in " +
+ OldFile->getName() + " and " + NewFile->getName())
+ .str();
+ if (Config->AllowMultipleDefinition)
+ warning(Msg);
+ else
+ error(Msg);
}
----------------
Ok. Fixed.
================
Comment at: test/elf2/allow-multiple-definition.s:7
@@ +6,3 @@
+# RUN: lld -flavor gnu2 --allow-multiple-definition %t1 %t2 -o %t3
+# RUN: lld -flavor gnu2 --allow-multiple-definition %t2 %t1 -o %t4
+# RUN: llvm-objdump -d %t3 | FileCheck %s
----------------
Good question. That definitely was a bug. Fixed.
http://reviews.llvm.org/D13169
More information about the llvm-commits
mailing list