[PATCH] D45418: [SimplifyLibcalls] Atoi, strtol replacements
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 14:27:04 PDT 2018
efriedma added a comment.
Can you share some of the code between optimizeAtoi and optimizeStrtol?
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1719
+ if (!isCLocale())
+ return nullptr;
+
----------------
Like I mentioned before, we don't need this check; it's safe to assume the compiler is running in the C locale.
================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1737
+ if (*End != '\0')
+ return nullptr;
+
----------------
Needs a comment here to explain why you're checking this.
https://reviews.llvm.org/D45418
More information about the llvm-commits
mailing list