[LLVMdev] MCStreamer interface

Chris Lattner clattner at apple.com
Fri May 7 10:19:11 PDT 2010


On May 6, 2010, at 11:12 PM, Peter S. Housel wrote:

> On Wed, 2010-05-05 at 13:22 -0700, Nathan Jeffords wrote:
> 
>> 
>>        The important point here is that the COFF MCSection needs to
>>        have the right level of semantic information.  In fact,
>>        MCSection is the place that I'd start for COFF bringup.
>> 
>> OK, I see that now. The current isolation
>> between TargetLoweringObjectFile -> MCStreamer -> MCObjectWriter has
>> proven somewhat problematic, mostly due to my lack of understanding.
>> I guess MCSectionXXX was meant to provide communication between them.
>> Should the same be true of MCSymbol, and their data counterparts?
> 
> I'm enclosing my patch for reforming MCSectionCOFF to match the
> implementation strategy of the other two MCSection classes. You may find
> it useful as a starting point. It seems to be complete and correct, and
> worked for what I tried with it, but I didn't find time to test it fully
> (e.g., by bootstrapping clang under Cygwin).

Looks really great to me, applied in r103267, thanks!

One thing:

+++ include/llvm/CodeGen/TargetLoweringObjectFileImpl.h	(working copy)
@@ -161,13 +161,15 @@
...
+  virtual const MCSection *getDrectveSection() const { return DrectveSection; }

This shouldn't need to be virtual?

-Chris



More information about the llvm-dev mailing list