[llvm-commits] [llvm] r75891 - /llvm/trunk/include/llvm/Target/TargetRegistry.h

Daniel Dunbar daniel at zuster.org
Wed Jul 15 19:38:28 PDT 2009


Author: ddunbar
Date: Wed Jul 15 21:38:28 2009
New Revision: 75891

URL: http://llvm.org/viewvc/llvm-project?rev=75891&view=rev
Log:
Fix gcc 4.0 build failure, can't rely on access inside nested friended class.

Modified:
    llvm/trunk/include/llvm/Target/TargetRegistry.h

Modified: llvm/trunk/include/llvm/Target/TargetRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegistry.h?rev=75891&r1=75890&r2=75891&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegistry.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegistry.h Wed Jul 15 21:38:28 2009
@@ -82,6 +82,9 @@
     AsmPrinterCtorTy AsmPrinterCtorFn;
 
   public:
+    // getNext - Return the next registered target.
+    const Target *getNext() const { return Next; }
+
     /// getName - Get the target name.
     const char *getName() const { return Name; }
 
@@ -138,7 +141,7 @@
       // Iterator traversal: forward iteration only
       iterator &operator++() {          // Preincrement
         assert(Current && "Cannot increment end iterator!");
-        Current = Current->Next;
+        Current = Current->getNext();
         return *this;
       }
       iterator operator++(int) {        // Postincrement





More information about the llvm-commits mailing list