[lld] r193885 - Remove duplicate calls of pm.add() for RoundTrip tests.
Rui Ueyama
ruiu at google.com
Fri Nov 1 14:05:42 PDT 2013
Author: ruiu
Date: Fri Nov 1 16:05:42 2013
New Revision: 193885
URL: http://llvm.org/viewvc/llvm-project?rev=193885&view=rev
Log:
Remove duplicate calls of pm.add() for RoundTrip tests.
Modified:
lld/trunk/lib/Driver/Driver.cpp
lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp
lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
Modified: lld/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Driver.cpp?rev=193885&r1=193884&r2=193885&view=diff
==============================================================================
--- lld/trunk/lib/Driver/Driver.cpp (original)
+++ lld/trunk/lib/Driver/Driver.cpp Fri Nov 1 16:05:42 2013
@@ -115,11 +115,9 @@ bool Driver::link(LinkingContext &contex
PassManager pm;
context.addPasses(pm);
-// TODO: Replace the code with #ifndef NDEBUG after fixing the
-// failures with pecoff
-#ifdef FIXME
- pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(context)));
+#ifndef NDEBUG
pm.add(std::unique_ptr<Pass>(new RoundTripYAMLPass(context)));
+ pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(context)));
#endif
pm.runOnFile(merged);
Modified: lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp?rev=193885&r1=193884&r2=193885&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp Fri Nov 1 16:05:42 2013
@@ -291,10 +291,6 @@ void CoreLinkingContext::addPasses(PassM
else
llvm_unreachable("bad pass name");
}
-#ifndef NDEBUG
- pm.add(std::unique_ptr<Pass>(new RoundTripYAMLPass(*this)));
- pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(*this)));
-#endif
}
Writer &CoreLinkingContext::writer() const { return *_writer; }
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=193885&r1=193884&r2=193885&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Fri Nov 1 16:05:42 2013
@@ -58,10 +58,6 @@ void ELFLinkingContext::addPasses(PassMa
if (_runLayoutPass)
pm.add(std::unique_ptr<Pass>(new LayoutPass()));
pm.add(std::unique_ptr<Pass>(new elf::ArrayOrderPass()));
-#ifndef NDEBUG
- pm.add(std::unique_ptr<Pass>(new RoundTripYAMLPass(*this)));
- pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(*this)));
-#endif
}
uint16_t ELFLinkingContext::getOutputMachine() const {
Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=193885&r1=193884&r2=193885&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Fri Nov 1 16:05:42 2013
@@ -241,10 +241,6 @@ void MachOLinkingContext::addPasses(Pass
pm.add(std::unique_ptr<Pass>(new mach_o::GOTPass));
pm.add(std::unique_ptr<Pass>(new mach_o::StubsPass(*this)));
pm.add(std::unique_ptr<Pass>(new LayoutPass()));
-#ifndef NDEBUG
- pm.add(std::unique_ptr<Pass>(new RoundTripYAMLPass(*this)));
- pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(*this)));
-#endif
}
Writer &MachOLinkingContext::writer() const {
Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp?rev=193885&r1=193884&r2=193885&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp Fri Nov 1 16:05:42 2013
@@ -210,9 +210,5 @@ void PECOFFLinkingContext::addPasses(Pas
pm.add(std::unique_ptr<Pass>(new pecoff::GroupedSectionsPass()));
pm.add(std::unique_ptr<Pass>(new pecoff::IdataPass(*this)));
pm.add(std::unique_ptr<Pass>(new LayoutPass()));
-#ifndef NDEBUG
- pm.add(std::unique_ptr<Pass>(new RoundTripYAMLPass(*this)));
- pm.add(std::unique_ptr<Pass>(new RoundTripNativePass(*this)));
-#endif
}
} // end namespace lld
More information about the llvm-commits
mailing list