[llvm-commits] [PATCH 2/5] Add LookupSymbol on MCContext using Twine

Will Schmidt will_schmidt at vnet.ibm.com
Wed Sep 5 10:57:49 PDT 2012


On Wed, 2012-09-05 at 13:00 -0300, Adhemerval Zanella wrote:
> This patch adds a method to search for a symbol using as argument a
> Twine.
> I use this method on following patches.
> 
> Please review.

> 
> 
> 
> 
> 
> 
> differences
> between files
> attachment
> (02-mccontext-lookupsymbol-twine.patch)
> 
> Index: include/llvm/MC/MCContext.h
> ===================================================================
> --- include/llvm/MC/MCContext.h (revision 163212)
> +++ include/llvm/MC/MCContext.h (working copy)
> @@ -183,6 +183,7 @@
> 
>      /// LookupSymbol - Get the symbol for \p Name, or null.
>      MCSymbol *LookupSymbol(StringRef Name) const;
> +    MCSymbol *LookupSymbol(const Twine &Name) const;

Is it worth adding a comment above to explain what/why you are adding an
additional LookupSymbol() function? 

i.e.   /// LookupSymbol(const Twine...) - used to sort out scenarios
with multiple duplicate symbol names by adding an increment.

For better context, may be worth adding this at the same time you add
the users of this function.

Thanks, 
-Will






More information about the llvm-commits mailing list