[PATCH] D76031: [mlir][CRunnerUtils] Enable compilation with C++11 toolchain on microcontroller platforms.

Aart Bik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 15:32:58 PDT 2020


aartbik accepted this revision.
aartbik added a comment.
This revision is now accepted and ready to land.

LGTM if others see no Windows issue



================
Comment at: mlir/include/mlir/ExecutionEngine/CRunnerUtils.h:48
 constexpr unsigned nextPowerOf2(int N) {
-  if (N <= 1)
-    return 1;
-  return isPowerOf2(N) ? N : 2 * nextPowerOf2((N + 1) / 2);
+  return (N <= 1) ? 1 : (isPowerOf2(N) ? N : 2 * nextPowerOf2((N + 1) / 2));
 }
----------------
perhaps use () on the part after : too for readability
(assuming this does not violate some llvm brevity rule I don't know yet :-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76031/new/

https://reviews.llvm.org/D76031





More information about the llvm-commits mailing list