summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorzerny@chromium.org <zerny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 14:59:20 +0000
committerzerny@chromium.org <zerny@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 14:59:20 +0000
commitc8edb27701d434eb16f8ae39f12b67c8f5270838 (patch)
tree36290a7b3de07e53a9b0f025584c62ccef77e613 /tools/clang
parented2f65675442974f424077c322134f9bbe64719e (diff)
downloadchromium_src-c8edb27701d434eb16f8ae39f12b67c8f5270838.zip
chromium_src-c8edb27701d434eb16f8ae39f12b67c8f5270838.tar.gz
chromium_src-c8edb27701d434eb16f8ae39f12b67c8f5270838.tar.bz2
Blink GC plugin: remove temporary exceptions for the TreeShared/Node hierarchy.
BUG=334149 R=ager@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/270623009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rw-r--r--tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp7
-rw-r--r--tools/clang/blink_gc_plugin/Config.h4
-rw-r--r--tools/clang/blink_gc_plugin/RecordInfo.cpp18
-rw-r--r--tools/clang/blink_gc_plugin/RecordInfo.h1
4 files changed, 2 insertions, 28 deletions
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
index d57d7d7..4b023c3 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -503,9 +503,7 @@ class CheckFieldsVisitor : public RecursiveEdgeVisitor {
if (options_.enable_oilpan) {
if (Parent()->IsOwnPtr() ||
Parent()->IsRawPtrClass() ||
- (stack_allocated_host_ && Parent()->IsRawPtr() &&
- // TODO: Remove this exception once the node hierarchy is moved.
- !edge->value()->IsTreeShared())) {
+ (stack_allocated_host_ && Parent()->IsRawPtr())) {
invalid_fields_.push_back(std::make_pair(current_, Parent()));
return;
}
@@ -726,8 +724,7 @@ class BlinkGCPluginConsumer : public ASTConsumer {
if (CXXMethodDecl* newop = info->DeclaresNewOperator())
ReportClassOverridesNew(info, newop);
- // TODO: Remove this exception once TreeShared is properly traced.
- if (!info->IsTreeShared()) {
+ {
CheckGCRootsVisitor visitor;
if (visitor.ContainsGCRoots(info))
ReportClassContainsGCRoots(info, &visitor.gc_roots());
diff --git a/tools/clang/blink_gc_plugin/Config.h b/tools/clang/blink_gc_plugin/Config.h
index 917d070..765e32a 100644
--- a/tools/clang/blink_gc_plugin/Config.h
+++ b/tools/clang/blink_gc_plugin/Config.h
@@ -111,10 +111,6 @@ class Config {
IsGCMixinBase(name);
}
- static bool IsTreeSharedBase(const std::string& name) {
- return name == "TreeShared";
- }
-
static bool IsAnnotated(clang::Decl* decl, const std::string& anno) {
clang::AnnotateAttr* attr = decl->getAttr<clang::AnnotateAttr>();
return attr && (attr->getAnnotation() == anno);
diff --git a/tools/clang/blink_gc_plugin/RecordInfo.cpp b/tools/clang/blink_gc_plugin/RecordInfo.cpp
index c766d28..5250eaa 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.cpp
+++ b/tools/clang/blink_gc_plugin/RecordInfo.cpp
@@ -115,24 +115,6 @@ bool RecordInfo::IsGCFinalized() {
return false;
}
-bool RecordInfo::IsTreeShared() {
- if (Config::IsTreeSharedBase(name_))
- return true;
- if (!IsGCDerived())
- return false;
- for (CXXBasePaths::paths_iterator it = base_paths_->begin();
- it != base_paths_->end();
- ++it) {
- // TreeShared is an immediate base of GCFinalized.
- if (it->size() < 2) continue;
- const CXXBasePathElement& elem = (*it)[it->size() - 2];
- CXXRecordDecl* base = elem.Base->getType()->getAsCXXRecordDecl();
- if (Config::IsTreeSharedBase(base->getName()))
- return true;
- }
- return false;
-}
-
// A GC mixin is a class that inherits from a GC mixin base and has
// not yet been "mixed in" with another GC base class.
bool RecordInfo::IsGCMixin() {
diff --git a/tools/clang/blink_gc_plugin/RecordInfo.h b/tools/clang/blink_gc_plugin/RecordInfo.h
index 5bad7ce..a2fa10e 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.h
+++ b/tools/clang/blink_gc_plugin/RecordInfo.h
@@ -92,7 +92,6 @@ class RecordInfo {
bool IsStackAllocated();
bool IsNonNewable();
bool IsOnlyPlacementNewable();
- bool IsTreeShared();
clang::CXXMethodDecl* DeclaresNewOperator();
bool RequiresTraceMethod();