fix DEBUG_WITH_TYPE to build without warnings in non-debug builds

llvm-svn: 178787
This commit is contained in:
Nick Kledzik 2013-04-04 20:32:18 +00:00
parent 7733466c73
commit f4fa8c0a75
1 changed files with 16 additions and 13 deletions

View File

@ -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";
}
});
}