[PATCH] [LayoutPass] Add a method to check the followon graph structure.

Shankar Kalpathi Easwaran shankarke at gmail.com
Wed Jun 5 19:24:29 PDT 2013



================
Comment at: lib/ReaderWriter/ELF/Atoms.h:484-488
@@ -483,2 +483,7 @@
 
+  std::string toDebugString() const {
+    std::string name = DefinedAtom::toDebugString();
+    return name + " in " + _sectionName.str();
+  }
+
 private:
----------------
Rui Ueyama wrote:
> Shankar Kalpathi Easwaran wrote:
> > Rui Ueyama wrote:
> > > Shankar Kalpathi Easwaran wrote:
> > > > should be moved to LayoutPass, you can call toDebugString(Atom) and have this function in the LayoutPass.
> > > > 
> > > So toDebugString()'s signature should be toDebugString(const DefinedAtom *), and it dyn_cast the argument to ELFDefinedAtom, right? I tried that and found that there seems no easy way to do that, because ELFDefinedAtom<ELFT> is template class and there's no easy way to know what ELFT type is in the layout pass. Am I missing something?
> > Since you need only the name, you can access that using DefinedAtom * itself.
> Yeah, name is accessible, but _sectionName is a field defined only in ELFDefinedAtom.
You can use customSectionName depending on sectionChoice. All of them are accessible. 


http://llvm-reviews.chandlerc.com/D922



More information about the llvm-commits mailing list