[compiler-rt] r244946 - [UBSan] Enable 'help' option output, report unrecognized flags
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 13:34:01 PDT 2015
Author: samsonov
Date: Thu Aug 13 15:34:00 2015
New Revision: 244946
URL: http://llvm.org/viewvc/llvm-project?rev=244946&view=rev
Log:
[UBSan] Enable 'help' option output, report unrecognized flags
Summary:
Let UBSan output flag description if 'help' options is provided.
Report unrecognized flags if verbosity mode is turned on.
Patch by Svetlana Ryabkova!
Differential Revision: http://reviews.llvm.org/D11903
Modified:
compiler-rt/trunk/lib/ubsan/ubsan_flags.cc
Modified: compiler-rt/trunk/lib/ubsan/ubsan_flags.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_flags.cc?rev=244946&r1=244945&r2=244946&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_flags.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_flags.cc Thu Aug 13 15:34:00 2015
@@ -60,6 +60,9 @@ void InitializeFlags() {
// Override from environment variable.
parser.ParseString(GetEnv("UBSAN_OPTIONS"));
SetVerbosity(common_flags()->verbosity);
+ if (Verbosity()) ReportUnrecognizedFlags();
+
+ if (common_flags()->help) parser.PrintFlagDescriptions();
}
} // namespace __ubsan
More information about the llvm-commits
mailing list