<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Bill,<div><br></div><div>thanks! I applied your patch.</div><div><br></div><div>Sean</div><div><br><div><div>On Aug 17, 2010, at 8:32 PM, William Lynch wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,</div><div><br></div><div>IRToDWARF and IRForTarget current are subclasses of ModulePass. The constructors of these two methods look like the following:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> //------------------------------------------------------------------</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /// Constructor</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> ///</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// @param[in] pid</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /// A unique identifier for this pass. I'm not sure what this does;</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// it just gets passed down to ModulePass's constructor.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> ///</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// @param[in] decl_map</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// The list of externally-referenced variables for the expression,</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /// for use in looking up globals and allocating the argument</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// struct. See the documentation for ClangExpressionDeclMap.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> ///</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// @param[in] target_data</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// The data layout information for the target. This information is</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> /// used to determine the sizes of types that have been lowered into</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> /// IR types.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> //------------------------------------------------------------------</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> IRForTarget(lldb_private::ClangExpressionDeclMap *decl_map, const llvm::TargetData *target_data) : ModulePass(pid);</font></div>
</div><div><br></div><div>Judging from ModulePasses from LLVM, the pid parameter should actually be the same char over all instances of this Pass. It's basically a unique spot in memory. The following two patches implement this.</div>
<div><br></div><div>As an aside, I'm compiling LLDB against LLVM trunk (not the zip file), so this might need an update of that as well.</div><div><br></div><div>Enjoy,</div><div>Bill Lynch</div>
<span><patch1.patch></span><span><patch2.patch></span>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></blockquote></div><br></div></body></html>