r214333 - Add a state variable to the loop hint attribute.

Tyler Nowicki tnowicki at apple.com
Thu Jul 31 14:19:31 PDT 2014


Hi Aaron,

Thanks for investigating this!

I was looking at the code again and I thought maybe the crash is due to this code in HandlePragmaLoopHint

  IdentifierInfo *OptionInfo = Info->Option.getIdentifierInfo();
  Hint.OptionLoc = IdentifierLoc::create(
      Actions.Context, Info->Option.getLocation(), OptionInfo);

The call to 'Info->Option.getIdentifierInfo();’ might be failing because with nounroll and sometimes unroll an option is not specified. I assumed it would just return null. But that could be a poor assumption. If that is the case then it should be moved below the test that returns early if #pragma unroll or #pragma nounroll are specified.

  if (TokSize == 0 && (PragmaUnroll || PragmaNoUnroll)) {
    ConsumeToken(); // The annotation token.
    Hint.Range = Info->PragmaName.getLocation();
    return true;
  }

The windows build-bots seem rather busy. Could you give this a try?

Thanks,

Tyler

On Jul 31, 2014, at 2:07 PM, Aaron Ballman <aaron at aaronballman.com> wrote:

> On Thu, Jul 31, 2014 at 4:25 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
>> Thanks,
>> 
>> I don’t have valgrind or a windows machine. Let me know if the resubmit works for you.
> 
> It's still crashing for me on Windows. I will investigate.
> 
> ~Aaron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140731/f554e88a/attachment.html>


More information about the cfe-commits mailing list