This is an archive of the discontinued LLVM Phabricator instance.

Always evaluate the second argument for CHECK() lazily.
AcceptedPublic

Authored by ruiu on Dec 6 2017, 12:41 PM.

Details

Summary

This patch is to rename check CHECK and make it a C macro, so that
we can evaluate the second argument lazily.

Event Timeline

ruiu created this revision.Dec 6 2017, 12:41 PM
ruiu updated this revision to Diff 125784.Dec 6 2017, 12:42 PM
  • fix typo

How much does this buy us?

ruiu added a comment.Dec 6 2017, 1:04 PM

How much does this buy us?

I honestly don't know. The aim of this patch is to merge check and checkLazy so that we don't have to make a guess about the cost of evaluating the second argument when we use CHECK.

ruiu added a subscriber: llvm-commits.
inglorion accepted this revision.Dec 6 2017, 1:19 PM

Alright, so it's basically like being able to write CHECK instead of check(e) and checkLazy(e, messagefun). I like that.

This revision is now accepted and ready to land.Dec 6 2017, 1:19 PM
rafael edited edge metadata.Dec 6 2017, 1:32 PM

This is a duplicate with D40915?

espindola edited reviewers, added: espindola; removed: rafael.Mar 14 2018, 4:55 PM