[PATCH] D40985: [AArch64] Add Exynos to host detection

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 14:38:16 PST 2017


evandro marked 3 inline comments as done.
evandro added inline comments.


================
Comment at: llvm/lib/Support/Host.cpp:233-234
+    for (auto I : Lines)
+      if (I.startswith("CPU part"))
+        I.substr(8).ltrim("\t :").getAsInteger(16, Part);
+
----------------
zturner wrote:
> How about 
> 
> ```
> if (I.consume_front("CPU part"))
>   I.ltrim("\t :").getAsInteger(16, Part);
> ```
> 
> As an example of why I prefer `consume_front`, it fixes what appears to be above in the preceding if statement (about CPU variant), where you've hardcoded 8 but actually meant 11.
Makes sense.


Repository:
  rL LLVM

https://reviews.llvm.org/D40985





More information about the llvm-commits mailing list