[llvm-commits] [PATCH 2/5] Record a symbol's size which is needed for ELF symbol tables.

Matt Fleming matt at console-pimps.org
Thu Aug 12 02:31:31 PDT 2010


On Wed, Aug 11, 2010 at 03:45:54PM -0700, Bill Wendling wrote:
> On Aug 11, 2010, at 3:20 PM, Matt Fleming wrote:
> 
> > ---
> > include/llvm/MC/MCAssembler.h |   14 ++++++++++++++
> > lib/MC/MCAssembler.cpp        |    3 ++-
> > 2 files changed, 16 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
> > index 50cb73b..24bd7d2 100644
> > --- a/include/llvm/MC/MCAssembler.h
> > +++ b/include/llvm/MC/MCAssembler.h
> > @@ -24,6 +24,7 @@ namespace llvm {
> > class raw_ostream;
> > class MCAsmLayout;
> > class MCAssembler;
> > +class MCBinaryExpr;
> > class MCContext;
> > class MCCodeEmitter;
> > class MCExpr;
> > @@ -453,6 +454,10 @@ public:
> >   // common symbol can never get a definition.
> >   uint64_t CommonSize;
> > 
> > +  /// SymbolSize - An expression describing how to calculate the size of
> > +  /// a symbol. If a symbol has no size this field will be NULL.
> > +  const MCExpr *SymbolSize;
> > +
> >   /// CommonAlign - The alignment of the symbol, if it is 'common'.
> >   //
> >   // FIXME: Pack this in with other fields?
> > @@ -510,6 +515,15 @@ public:
> >     return CommonSize;
> >   }
> > 
> > +  void setSize(const MCExpr *SS) {
> > +    SymbolSize = SS;
> > +  }
> > +
> > +  const MCExpr *getSize() {
> 
> You can constify this method "getSize() const {".

Thanks, done!



More information about the llvm-commits mailing list