[llvm] r258399 - Revert obsolete llvm-link -preserve-modules option/test
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 06:28:52 PST 2016
Author: tejohnson
Date: Thu Jan 21 08:28:52 2016
New Revision: 258399
URL: http://llvm.org/viewvc/llvm-project?rev=258399&view=rev
Log:
Revert obsolete llvm-link -preserve-modules option/test
This testing mode is now obsolete with the change to linkInModule
to take a std::unique_ptr to Module.
Modified:
llvm/trunk/test/Linker/only-needed-named-metadata.ll
llvm/trunk/tools/llvm-link/llvm-link.cpp
Modified: llvm/trunk/test/Linker/only-needed-named-metadata.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/only-needed-named-metadata.ll?rev=258399&r1=258398&r2=258399&view=diff
==============================================================================
--- llvm/trunk/test/Linker/only-needed-named-metadata.ll (original)
+++ llvm/trunk/test/Linker/only-needed-named-metadata.ll Thu Jan 21 08:28:52 2016
@@ -23,11 +23,6 @@
; ONLYNEEDED-NOT:@analias
; ONLYNEEDED-NOT:@globalfunc2()
-; Test -only-needed link with the modules preserved instead of freeing to
-; catch any cross-module references to metadata, which the bitcode writer
-; will assert on.
-; RUN: llvm-link -preserve-modules -o %t3.bc -only-needed %S/Inputs/only-needed-named-metadata.ll %S/only-needed-named-metadata.ll
-
@X = global i32 5
@U = global i32 6
@U_linkonce = linkonce_odr hidden global i32 6
Modified: llvm/trunk/tools/llvm-link/llvm-link.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/llvm-link.cpp?rev=258399&r1=258398&r2=258399&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-link/llvm-link.cpp (original)
+++ llvm/trunk/tools/llvm-link/llvm-link.cpp Thu Jan 21 08:28:52 2016
@@ -89,10 +89,6 @@ static cl::opt<bool>
SuppressWarnings("suppress-warnings", cl::desc("Suppress all linking warnings"),
cl::init(false));
-static cl::opt<bool>
- PreserveModules("preserve-modules",
- cl::desc("Preserve linked modules for testing"));
-
static cl::opt<bool> PreserveBitcodeUseListOrder(
"preserve-bc-uselistorder",
cl::desc("Preserve use-list order when writing LLVM bitcode."),
@@ -284,15 +280,6 @@ static bool linkFiles(const char *argv0,
return false;
// All linker flags apply to linking of subsequent files.
ApplicableFlags = Flags;
-
- // If requested for testing, preserve modules by releasing them from
- // the unique_ptr before the are freed. This can help catch any
- // cross-module references from e.g. unneeded metadata references
- // that aren't properly set to null but instead mapped to the source
- // module version. The bitcode writer will assert if it finds any such
- // cross-module references.
- if (PreserveModules)
- M.release();
}
return true;
More information about the llvm-commits
mailing list