diff options
| author | Nick Kledzik <kledzik@apple.com> | 2013-04-04 20:32:18 +0000 |
|---|---|---|
| committer | Nick Kledzik <kledzik@apple.com> | 2013-04-04 20:32:18 +0000 |
| commit | f4fa8c0a753ed9abd77656695e9412a79135e1db (patch) | |
| tree | 05b4ee98c35c8ae148414d06ac94ea9fe75c309f | |
| parent | 7733466c73be202860bf64980fb1159d071b2ab5 (diff) | |
| download | bcm5719-llvm-f4fa8c0a753ed9abd77656695e9412a79135e1db.tar.gz bcm5719-llvm-f4fa8c0a753ed9abd77656695e9412a79135e1db.zip | |
fix DEBUG_WITH_TYPE to build without warnings in non-debug builds
llvm-svn: 178787
| -rw-r--r-- | lld/lib/Passes/LayoutPass.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lld/lib/Passes/LayoutPass.cpp b/lld/lib/Passes/LayoutPass.cpp index 6edbcadbcbf..dd9fe7c979d 100644 --- a/lld/lib/Passes/LayoutPass.cpp +++ b/lld/lib/Passes/LayoutPass.cpp @@ -436,29 +436,32 @@ void LayoutPass::perform(MutableFile &mergedFile) { // Build override maps buildOrdinalOverrideMap(atomRange); - DEBUG_WITH_TYPE("layout", llvm::dbgs() << "unsorted atoms:\n"); - for ( const DefinedAtom *atom : atomRange ) { - DEBUG_WITH_TYPE("layout", llvm::dbgs() - << " file=" << atom->file().path() + DEBUG_WITH_TYPE("layout", { + llvm::dbgs() << "unsorted atoms:\n"; + for (const DefinedAtom *atom : atomRange) { + llvm::dbgs() << " file=" << atom->file().path() << ", name=" << atom->name() << ", size=" << atom->size() << ", type=" << atom->contentType() << ", ordinal=" << atom->ordinal() - << "\n"); - } - + << "\n"; + } + }); + // sort the atoms std::sort(atomRange.begin(), atomRange.end(), _compareAtoms); - DEBUG_WITH_TYPE("layout", llvm::dbgs() << "sorted atoms:\n"); - for ( const DefinedAtom *atom : atomRange ) { - DEBUG_WITH_TYPE("layout", llvm::dbgs() - << " file=" << atom->file().path() + DEBUG_WITH_TYPE("layout", { + llvm::dbgs() << "sorted atoms:\n"; + for (const DefinedAtom *atom : atomRange) { + llvm::dbgs() << " file=" << atom->file().path() << ", name=" << atom->name() << ", size=" << atom->size() << ", type=" << atom->contentType() << ", ordinal=" << atom->ordinal() - << "\n"); - } + << "\n"; + } + }); + } |

