[llvm] r315183 - [TableGen] Simplify, add range_loop in CodeGenSchedule

Javed Absar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 01:16:40 PDT 2017


Yes indeed, I agree. Will make the change.

________________________________
From: aemerson at apple.com <aemerson at apple.com> on behalf of Amara Emerson <aemerson at apple.com>
Sent: 08 October 2017 20:32:18
To: Javed Absar
Cc: llvm-commits at lists.llvm.org
Subject: Re: [llvm] r315183 - [TableGen] Simplify, add range_loop in CodeGenSchedule


> @@ -830,16 +830,16 @@ void CodeGenSchedModels::collectProcItin
> void CodeGenSchedModels::collectProcItinRW() {
>   RecVec ItinRWDefs = Records.getAllDerivedDefinitions("ItinRW");
>   std::sort(ItinRWDefs.begin(), ItinRWDefs.end(), LessRecord());
> -  for (RecIter II = ItinRWDefs.begin(), IE = ItinRWDefs.end(); II != IE; ++II) {
> -    if (!(*II)->getValueInit("SchedModel")->isComplete())
> -      PrintFatalError((*II)->getLoc(), "SchedModel is undefined");
> -    Record *ModelDef = (*II)->getValueAsDef("SchedModel");
> +  for (Record *RWDef  : make_range(ItinRWDefs.begin(), ItinRWDefs.end())) {
You don’t need a make_range here.

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/07865297/attachment.html>


More information about the llvm-commits mailing list