diff --git a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp index 252c91cc53a5..cd40eafaef9c 100644 --- a/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp +++ b/lld/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp @@ -12,15 +12,17 @@ #include "IdataPass.h" #include "LinkerGeneratedSymbolFile.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Path.h" #include "lld/Core/PassManager.h" #include "lld/Passes/LayoutPass.h" +#include "lld/Passes/RoundTripNativePass.h" +#include "lld/Passes/RoundTripYAMLPass.h" #include "lld/ReaderWriter/PECOFFLinkingContext.h" #include "lld/ReaderWriter/Reader.h" #include "lld/ReaderWriter/Simple.h" #include "lld/ReaderWriter/Writer.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/Path.h" #include #include @@ -208,5 +210,9 @@ void PECOFFLinkingContext::addPasses(PassManager &pm) { pm.add(std::unique_ptr(new pecoff::GroupedSectionsPass())); pm.add(std::unique_ptr(new pecoff::IdataPass(*this))); pm.add(std::unique_ptr(new LayoutPass())); +#ifndef NDEBUG + pm.add(std::unique_ptr(new RoundTripYAMLPass(*this))); + pm.add(std::unique_ptr(new RoundTripNativePass(*this))); +#endif } } // end namespace lld