diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-28 00:24:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-28 00:24:16 +0000 |
commit | 9f8eff31db00ba4efdef4c81858d12a7e9c93b46 (patch) | |
tree | d6f22e338845c1825cfd2c8fffa0141ffd0b83c2 /llvm/tools/bugpoint/Miscompilation.cpp | |
parent | 294eecf69e9b36bf67d96ffa162ed3372a14c4ee (diff) | |
download | bcm5719-llvm-9f8eff31db00ba4efdef4c81858d12a7e9c93b46.tar.gz bcm5719-llvm-9f8eff31db00ba4efdef4c81858d12a7e9c93b46.zip |
Remove the PreserveSource linker mode.
I noticed that it was untested, and forcing it on caused some tests to fail:
LLVM :: Linker/metadata-a.ll
LLVM :: Linker/prefixdata.ll
LLVM :: Linker/type-unique-odr-a.ll
LLVM :: Linker/type-unique-simple-a.ll
LLVM :: Linker/type-unique-simple2-a.ll
LLVM :: Linker/type-unique-simple2.ll
LLVM :: Linker/type-unique-type-array-a.ll
LLVM :: Linker/unnamed-addr1-a.ll
LLVM :: Linker/visibility1.ll
If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.
llvm-svn: 220741
Diffstat (limited to 'llvm/tools/bugpoint/Miscompilation.cpp')
-rw-r--r-- | llvm/tools/bugpoint/Miscompilation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp index ce16d4d18af..8cb45838773 100644 --- a/llvm/tools/bugpoint/Miscompilation.cpp +++ b/llvm/tools/bugpoint/Miscompilation.cpp @@ -222,7 +222,7 @@ static Module *TestMergedProgram(const BugDriver &BD, Module *M1, Module *M2, M1 = CloneModule(M1); M2 = CloneModule(M2); } - if (Linker::LinkModules(M1, M2, Linker::DestroySource)) + if (Linker::LinkModules(M1, M2)) exit(1); delete M2; // We are done with this module. @@ -392,8 +392,7 @@ static bool ExtractLoops(BugDriver &BD, F->getFunctionType())); } - if (Linker::LinkModules(ToNotOptimize, ToOptimizeLoopExtracted, - Linker::DestroySource)) + if (Linker::LinkModules(ToNotOptimize, ToOptimizeLoopExtracted)) exit(1); MiscompiledFunctions.clear(); @@ -422,8 +421,7 @@ static bool ExtractLoops(BugDriver &BD, // extraction both didn't break the program, and didn't mask the problem. // Replace the current program with the loop extracted version, and try to // extract another loop. - if (Linker::LinkModules(ToNotOptimize, ToOptimizeLoopExtracted, - Linker::DestroySource)) + if (Linker::LinkModules(ToNotOptimize, ToOptimizeLoopExtracted)) exit(1); delete ToOptimizeLoopExtracted; @@ -601,7 +599,7 @@ static bool ExtractBlocks(BugDriver &BD, MisCompFunctions.push_back(std::make_pair(I->getName(), I->getFunctionType())); - if (Linker::LinkModules(ProgClone, Extracted.get(), Linker::DestroySource)) + if (Linker::LinkModules(ProgClone, Extracted.get())) exit(1); // Set the new program and delete the old one. |