summaryrefslogtreecommitdiffstats
path: root/base/linked_list.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-18 00:09:15 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-18 00:09:15 +0000
commit58680cec807bec4cbca35cfad74439a7653040c4 (patch)
tree1b22d316f591fce655f7e91dc43462534d9af577 /base/linked_list.h
parent784ea1ab3797a0aade739c3d80f9f12b41160aef (diff)
downloadchromium_src-58680cec807bec4cbca35cfad74439a7653040c4.zip
chromium_src-58680cec807bec4cbca35cfad74439a7653040c4.tar.gz
chromium_src-58680cec807bec4cbca35cfad74439a7653040c4.tar.bz2
Support for building Chrome using Clang.
To build, set the clang=1 gyp_define. This patch is the culmination of many months of effort and many patches. It contains the minimal changes to Chrome that are Clang-specific. With this, I can build the "chrome" target. Once this patch is in, we can incrementally fix bits of Chrome and various tests and remove the Clang-specific workarounds. Review URL: http://codereview.chromium.org/522020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linked_list.h')
-rw-r--r--base/linked_list.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/base/linked_list.h b/base/linked_list.h
index 0626025..d91a1f8 100644
--- a/base/linked_list.h
+++ b/base/linked_list.h
@@ -126,6 +126,13 @@ class LinkNode {
return static_cast<T*>(this);
}
+ // Work around a Clang bug reported upstream:
+ // http://llvm.org/bugs/show_bug.cgi?id=7974
+ // TODO(evanm): remove this and its sole caller.
+ void set(LinkNode<T>* prev, LinkNode<T>* next) {
+ previous_ = prev; next_ = next;
+ }
+
private:
LinkNode<T>* previous_;
LinkNode<T>* next_;
@@ -137,7 +144,7 @@ class LinkedList {
// The "root" node is self-referential, and forms the basis of a circular
// list (root_.next() will point back to the start of the list,
// and root_->previous() wraps around to the end of the list).
- LinkedList() : root_(&root_, &root_) {}
+ LinkedList() { root_.set(&root_, &root_); }
// Appends |e| to the end of the linked list.
void Append(LinkNode<T>* e) {