[PATCH] Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.cc
Alexey Samsonov
vonosmas at gmail.com
Fri Jul 25 11:19:56 PDT 2014
LGTM modulo nits below.
================
Comment at: lib/sanitizer_common/sanitizer_procmaps.h:90
@@ +89,3 @@
+// Reads process memory map in an OS-specific way.
+void ReadProcMaps(ProcSelfMapsBuff *proc_maps);
+
----------------
This function is implemented only on FreeBSD and Linux, but not on Mac. Put it near the ProcSelfMapsBuff definition above.
================
Comment at: lib/sanitizer_common/sanitizer_procmaps_common.cc:29
@@ +28,3 @@
+ if (c >= 'a' && c <= 'f')
+ return c - ('a' - 10);
+ if (c >= 'A' && c <= 'F')
----------------
please change it back to c - 'a' + 10
================
Comment at: lib/sanitizer_common/sanitizer_procmaps_common.cc:31
@@ +30,3 @@
+ if (c >= 'A' && c <= 'F')
+ return c - ('A' - 10);
+ return (-1);
----------------
and c - 'A' + 10
================
Comment at: lib/sanitizer_common/sanitizer_procmaps_common.cc:32
@@ +31,3 @@
+ return c - ('A' - 10);
+ return (-1);
+}
----------------
remove the parens
http://reviews.llvm.org/D4555
More information about the llvm-commits
mailing list