summaryrefslogtreecommitdiffstats
path: root/lld/lib/Passes/LayoutPass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/Passes/LayoutPass.cpp')
-rw-r--r--lld/lib/Passes/LayoutPass.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lld/lib/Passes/LayoutPass.cpp b/lld/lib/Passes/LayoutPass.cpp
index f6bf980006d..6edbcadbcbf 100644
--- a/lld/lib/Passes/LayoutPass.cpp
+++ b/lld/lib/Passes/LayoutPass.cpp
@@ -11,6 +11,7 @@
#define DEBUG_TYPE "LayoutPass"
#include "lld/Passes/LayoutPass.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/Debug.h"
@@ -435,6 +436,29 @@ 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()
+ << ", name=" << atom->name()
+ << ", size=" << atom->size()
+ << ", type=" << atom->contentType()
+ << ", ordinal=" << atom->ordinal()
+ << "\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()
+ << ", name=" << atom->name()
+ << ", size=" << atom->size()
+ << ", type=" << atom->contentType()
+ << ", ordinal=" << atom->ordinal()
+ << "\n");
+ }
+
}
OpenPOWER on IntegriCloud