Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / CollectVisitor.cpp
blob203e8adf24427a5fcb196f893feb1737d6caf41a
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "CollectVisitor.h"
7 #include "Config.h"
9 using namespace clang;
11 CollectVisitor::CollectVisitor() {
14 CollectVisitor::RecordVector& CollectVisitor::record_decls() {
15 return record_decls_;
18 CollectVisitor::MethodVector& CollectVisitor::trace_decls() {
19 return trace_decls_;
22 bool CollectVisitor::VisitCXXRecordDecl(CXXRecordDecl* record) {
23 if (record->hasDefinition() && record->isCompleteDefinition())
24 record_decls_.push_back(record);
25 return true;
28 bool CollectVisitor::VisitCXXMethodDecl(CXXMethodDecl* method) {
29 if (method->isThisDeclarationADefinition() && Config::IsTraceMethod(method))
30 trace_decls_.push_back(method);
31 return true;