[llvm-commits] Extract MachObjectWriter class to own header and code files

Bill Wendling wendling at apple.com
Mon Mar 15 15:32:43 PDT 2010


On Mar 15, 2010, at 10:06 AM, Aaron Gray wrote:

> Hi,
> 
> This patch extracts 'class MachObjectWriter' into its own .h and .cpp files. 
> 
> Tested on MSVC and Cygwin.
> 
Hi Aaron,

I'll let Chris & Daniel comment on the rest, but:

Index: lib/CodeGen/TargetLoweringObjectFileImpl.cpp
===================================================================
--- lib/CodeGen/TargetLoweringObjectFileImpl.cpp	(revision 98543)
+++ lib/CodeGen/TargetLoweringObjectFileImpl.cpp	(working copy)
@@ -469,6 +469,7 @@
   // Otherwise, return a new section.
   return Entry = MCSectionMachO::Create(Segment, Section, TypeAndAttributes,
                                         Reserved2, Kind, getContext());
+  assert( Entry != 0 && "MCSectionMachO::Create returns zero");
 }

The assert is dead code.

-bw





More information about the llvm-commits mailing list