[llvm] r239858 - Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 16 15:41:13 PDT 2015


>> -    return std::unique_ptr<Module>(ModuleOrErr.get());
>> +    return std::move(ModuleOrErr.get());
>
>
> You could probably just "return ModuleOrErr;" here?
>


No:

IRReader.cpp:44:12: error: no viable conversion from
'ErrorOr<std::unique_ptr<Module> >' to 'std::unique_ptr<Module>'

Cheers,
Rafael



More information about the llvm-commits mailing list