[llvm-commits] [PATCH 2/3] Make llvm-readobj also output all sections in the object file.

Sami Liedes sami.liedes at iki.fi
Fri Dec 28 09:17:30 PST 2012


On Fri, Dec 28, 2012 at 09:34:08AM -0500, Rafael EspĂ­ndola wrote:
> Please start functions with a lower case. Can you make checkError just
> check the error_code instead of calling the function too? That way we
> would have
> 
> StringRef Name;
> CheckError(SymbolRef::getName(Name), "SymbolRef.getName() failed");
>
> Which is a bit more verbose but easier to read IMHO than
> 
> StringRef Name =
>   CheckError(Sym, &SymbolRef::getName, "SymbolRef.getName() failed");
> 

You are right, that's better. I tried to think how to get rid of the
member function pointer, but somehow this solution did not occur to
me.

As for function name capitalization, I was trying to follow the style
used in the file before my modifications -- all function names there
apart from main() start with upper case. But if you think it's better
still to use lower case for new functions, I'll be glad to do that. Or
I could submit a patch to lower-case the current function names too,
but I somehow got the feeling from reading the LLVM Coding Standards
that such patches are generally despised.

	Sami



More information about the llvm-commits mailing list