[LLVMdev] Should APFloat's construct-from-string take a string length?

Daniel Dunbar daniel at zuster.org
Tue Aug 11 08:08:00 PDT 2009


On Tue, Aug 11, 2009 at 1:59 AM, Erick
Tryzelaar<idadesub at users.sourceforge.net> wrote:
> I noticed that APInt's construct-from-string takes the length of the string,
> but APFloat does not. Would it make sense to modify APFloat to also take a
> length? I would imagine that it'd help protect us against malformed string
> values.

This sounds reasonable to me. Note that you can change them both to
take a const StringRef& and get the standard variants (std::string,
const char*, ptr + size) for free.

 - Daniel



More information about the llvm-dev mailing list