jcai19 marked 4 inline comments as done.
jcai19 added inline comments.

================
Comment at: llvm/lib/Target/ARM/ARMFastISel.cpp:2418
+  bool PushLR = IntrinsicName &&
+      !memcmp(IntrinsicName, "\01__gnu_mcount_nc", 
sizeof("\01__gnu_mcount_nc"));
+  unsigned CallOpc = ARMSelectCallOp(UseReg, PushLR);
----------------
nickdesaulniers wrote:
> `memcmp` is a code smell in a C++ codebase, but I see that `IntrinsicName` is 
> a C style string.  Is there a reason why `strncmp` isn't used?
Good catch! I was thinking about one of str* functions and somehow ended up 
using memcpy. Guess I haven't written C code for a while :). Anyway, maybe 
strcmp is better here as the size of the two strings should match too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65019



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to