[PATCH] D61342: [sanitizer_common] Added 64-bit signed flag parser.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 16:05:41 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL359631: [sanitizer_common] Added 64-bit signed flag parser. (authored by hctim, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D61342?vs=197462&id=197480#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61342/new/
https://reviews.llvm.org/D61342
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_flag_parser.h
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_flag_parser.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_flag_parser.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_flag_parser.h
@@ -99,6 +99,15 @@
return ok;
}
+template <>
+inline bool FlagHandler<s64>::Parse(const char *value) {
+ const char *value_end;
+ *t_ = internal_simple_strtoll(value, &value_end, 10);
+ bool ok = *value_end == 0;
+ if (!ok) Printf("ERROR: Invalid value for s64 option: '%s'\n", value);
+ return ok;
+}
+
class FlagParser {
static const int kMaxFlags = 200;
struct Flag {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61342.197480.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190430/e85da457/attachment.bin>
More information about the llvm-commits
mailing list