Index: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp |
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp |
index 85140bb380c5ce5d52f63ea0cdf8c94c62d8a423..d60d73f9d6b89f4970256e64440e484b740f04e8 100644 |
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp |
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp |
@@ -29,30 +29,19 @@ class BlinkGCPluginAction : public PluginASTAction { |
return llvm::make_unique<BlinkGCPluginConsumer>(instance, options_); |
} |
- virtual bool ParseArgs(const CompilerInstance& instance, |
+ virtual bool ParseArgs(const CompilerInstance&, |
const std::vector<std::string>& args) { |
- bool parsed = true; |
- |
- for (size_t i = 0; i < args.size() && parsed; ++i) { |
- // TODO(sof): remove this case once a version of the GC plugin |
- // has rolled which has enable-oilpan-always baked in _and_ |
- // Blink no longer passes in the option (cf. Source/config.gyp) |
- if (args[i] == "enable-oilpan") |
- continue; |
- // TODO(sof): same for warn-raw-ptr |
- if (args[i] == "warn-raw-ptr") |
- continue; |
- if (args[i] == "dump-graph") { |
+ for (const auto& arg : args) { |
+ if (arg == "dump-graph") { |
options_.dump_graph = true; |
- } else if (args[i] == "warn-unneeded-finalizer") { |
+ } else if (arg == "warn-unneeded-finalizer") { |
options_.warn_unneeded_finalizer = true; |
} else { |
- parsed = false; |
- llvm::errs() << "Unknown blink-gc-plugin argument: " << args[i] << "\n"; |
+ llvm::errs() << "Unknown blink-gc-plugin argument: " << arg << "\n"; |
+ return false; |
} |
} |
- |
- return parsed; |
+ return true; |
} |
private: |