diff options
author | Shankar Easwaran <shankare@codeaurora.org> | 2013-10-29 05:12:14 +0000 |
---|---|---|
committer | Shankar Easwaran <shankare@codeaurora.org> | 2013-10-29 05:12:14 +0000 |
commit | 2bc24928d36531aeea52c6563a125adb22c203bf (patch) | |
tree | b7fd4a401d972e6c946bc2ba3309ca99924b2070 /lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp | |
parent | 3aca58f135b593a66c4c5680a4ce3b97d6531bdf (diff) | |
download | bcm5719-llvm-2bc24928d36531aeea52c6563a125adb22c203bf.tar.gz bcm5719-llvm-2bc24928d36531aeea52c6563a125adb22c203bf.zip |
[PassManager] add ReaderWriter{Native,YAML} to the Driver.
Enable this for the following flavors
a) core
b) gnu
c) darwin
Its disabled for the flavor PECOFF. Convenient markers are added with FIXME
comments in the Driver that would be removed and code removed from each flavor.
llvm-svn: 193585
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp index 6d6f6a75794..827d73d2abe 100644 --- a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp @@ -16,6 +16,8 @@ #include "lld/Core/Instrumentation.h" #include "lld/Passes/LayoutPass.h" +#include "lld/Passes/RoundTripNativePass.h" +#include "lld/Passes/RoundTripYAMLPass.h" #include "lld/ReaderWriter/ReaderLinkerScript.h" #include "llvm/ADT/Triple.h" @@ -52,10 +54,14 @@ bool ELFLinkingContext::isLittleEndian() const { return true; } -void ELFLinkingContext::addPasses(PassManager &pm) const { +void ELFLinkingContext::addPasses(PassManager &pm) { 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 { |