[PATCH] D11903: [UBSan] Enable 'help' option output, report unrecognized flags

Svetlana Ryabkova via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 06:36:38 PDT 2015


ryabkova.svetlana created this revision.
ryabkova.svetlana added a reviewer: samsonov.
ryabkova.svetlana added a subscriber: llvm-commits.

Let UBSan output flag description if 'help' options is provided.
Report unrecognized flags if verbosity mode is turned on.

http://reviews.llvm.org/D11903

Files:
  lib/ubsan/ubsan_flags.cc

Index: lib/ubsan/ubsan_flags.cc
===================================================================
--- lib/ubsan/ubsan_flags.cc
+++ lib/ubsan/ubsan_flags.cc
@@ -60,6 +60,9 @@
   // Override from environment variable.
   parser.ParseString(GetEnv("UBSAN_OPTIONS"));
   SetVerbosity(common_flags()->verbosity);
+  if (Verbosity()) ReportUnrecognizedFlags();
+
+  if (common_flags()->help) parser.PrintFlagDescriptions();
 }
 
 }  // namespace __ubsan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11903.31661.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150810/abe95af5/attachment.bin>


More information about the llvm-commits mailing list