[PATCH] Refactor bitcode reader to simplify control.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Jun 15 12:57:55 PDT 2015


I got the following test failures locally:

    LLVM :: Bitcode/invalid.test
    LLVM :: tools/gold/invalid.ll

On 15 June 2015 at 12:17, Karl Schimpf <kschimpf at google.com> wrote:
> Fixed issues raised by Filipe.
>
>
> ================
> Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:772
> @@ -717,2 +771,3 @@
> +  /// A class for maintaining the slot number definition
>    /// as a placeholder for the actual definition for forward constants defs.
>    class ConstantPlaceHolder : public ConstantExpr {
> ----------------
> filcab wrote:
>> Nit: Put more words on the first line.
> Done.
>
> ================
> Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:776
> @@ -720,3 +775,3 @@
>    public:
> -    // allocate space for exactly one operand
> +    /// allocate space for exactly one operand
>      void *operator new(size_t s) {
> ----------------
> filcab wrote:
>> Nit: If it's for docs, it's probably best to start with an uppercase letter.
> Done.
>
> ================
> Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:3233
> @@ +3232,3 @@
> +        uint64_t Bit = Stream.GetCurrentBitNo();
> +        errs() << "Malformed IR file at bit " << format("%x", (Bit / CHAR_BIT))
> +               << ":" << (Bit % CHAR_BIT);
> ----------------
> filcab wrote:
>> errs()? Or StrBuf?
>> Please also add a test for this error message.
> Good catch. I meant StrBuf, so that we can use the same API for all errors.
>
> http://reviews.llvm.org/D8786
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>



More information about the llvm-commits mailing list