[llvm] r202190 - Store a DataLayout in Module.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 25 14:30:02 PST 2014


>>   +void Module::setDataLayout(StringRef Desc) {
>> +  if (Desc.empty()) {
>> +    DataLayoutStr = "";
>> +  } else {
>> +    DL.init(Desc);
>> +    DataLayoutStr = DL.getStringRepresentation();
>> +  }
>> +}
>
> Shouldn't we clear DL if you store an empty string?

Yes, thanks!

> Is it expected that DataLayoutStr will equal Desc after this method is
> called?  If so, please add an assert.  Otherwise, please document.

Should be fixed in r202198.

Thanks,
Rafael



More information about the llvm-commits mailing list