[compiler-rt] r245362 - [DFSan] Properly initialize and parse common flags in DFSan.
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 14:54:30 PDT 2015
Author: samsonov
Date: Tue Aug 18 16:54:29 2015
New Revision: 245362
URL: http://llvm.org/viewvc/llvm-project?rev=245362&view=rev
Log:
[DFSan] Properly initialize and parse common flags in DFSan.
Modified:
compiler-rt/trunk/lib/dfsan/dfsan.cc
Modified: compiler-rt/trunk/lib/dfsan/dfsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/dfsan.cc?rev=245362&r1=245361&r2=245362&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/dfsan.cc (original)
+++ compiler-rt/trunk/lib/dfsan/dfsan.cc Tue Aug 18 16:54:29 2015
@@ -346,10 +346,16 @@ static void RegisterDfsanFlags(FlagParse
}
static void InitializeFlags() {
+ SetCommonFlagsDefaults();
+ flags().SetDefaults();
+
FlagParser parser;
+ RegisterCommonFlags(&parser);
RegisterDfsanFlags(&parser, &flags());
- flags().SetDefaults();
parser.ParseString(GetEnv("DFSAN_OPTIONS"));
+ SetVerbosity(common_flags()->verbosity);
+ if (Verbosity()) ReportUnrecognizedFlags();
+ if (common_flags()->help) parser.PrintFlagDescriptions();
}
static void dfsan_fini() {
More information about the llvm-commits
mailing list