[cfe-commits] r99280 - in /cfe/trunk/lib/CodeGen: CGVtable.cpp CGVtable.h

Anders Carlsson andersca at mac.com
Tue Mar 23 08:17:13 PDT 2010


Author: andersca
Date: Tue Mar 23 10:17:13 2010
New Revision: 99280

URL: http://llvm.org/viewvc/llvm-project?rev=99280&view=rev
Log:
Move ThunkInfo as well.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp
    cfe/trunk/lib/CodeGen/CGVtable.h

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=99280&r1=99279&r2=99280&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Tue Mar 23 10:17:13 2010
@@ -1164,34 +1164,6 @@
   /// currently building.
   MethodInfoMapTy MethodInfoMap;
   
-  /// ThunkInfo - The 'this' pointer adjustment as well as an optional return
-  /// adjustment for a thunk.
-  struct ThunkInfo {
-    /// This - The 'this' pointer adjustment.
-    ThisAdjustment This;
-    
-    /// Return - The return adjustment.
-    ReturnAdjustment Return;
-    
-    ThunkInfo() { }
-    
-    ThunkInfo(const ThisAdjustment &This, const ReturnAdjustment &Return)
-      : This(This), Return(Return) { }
-  
-    friend bool operator==(const ThunkInfo &LHS, const ThunkInfo &RHS) {
-      return LHS.This == RHS.This && LHS.Return == RHS.Return;
-    }
-
-    friend bool operator<(const ThunkInfo &LHS, const ThunkInfo &RHS) {
-      if (LHS.This < RHS.This)
-        return true;
-      
-      return LHS.This == RHS.This && LHS.Return < RHS.Return;
-    }
-    
-    bool isEmpty() const { return This.isEmpty() && Return.isEmpty(); }
-  };
-  
   typedef llvm::DenseMap<uint64_t, ThunkInfo> VtableThunksMapTy;
   
   /// VTableThunks - The thunks by vtable index in the vtable currently being 

Modified: cfe/trunk/lib/CodeGen/CGVtable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.h?rev=99280&r1=99279&r2=99280&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.h (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.h Tue Mar 23 10:17:13 2010
@@ -83,9 +83,36 @@
     return LHS.NonVirtual == RHS.NonVirtual && 
       LHS.VCallOffsetOffset < RHS.VCallOffsetOffset;
   }
-  
 };
 
+/// ThunkInfo - The 'this' pointer adjustment as well as an optional return
+/// adjustment for a thunk.
+struct ThunkInfo {
+  /// This - The 'this' pointer adjustment.
+  ThisAdjustment This;
+    
+  /// Return - The return adjustment.
+  ReturnAdjustment Return;
+
+  ThunkInfo() { }
+
+  ThunkInfo(const ThisAdjustment &This, const ReturnAdjustment &Return)
+    : This(This), Return(Return) { }
+
+  friend bool operator==(const ThunkInfo &LHS, const ThunkInfo &RHS) {
+    return LHS.This == RHS.This && LHS.Return == RHS.Return;
+  }
+
+  friend bool operator<(const ThunkInfo &LHS, const ThunkInfo &RHS) {
+    if (LHS.This < RHS.This)
+      return true;
+      
+    return LHS.This == RHS.This && LHS.Return < RHS.Return;
+  }
+
+  bool isEmpty() const { return This.isEmpty() && Return.isEmpty(); }
+};  
+
 /// ThunkAdjustment - Virtual and non-virtual adjustment for thunks.
 class ThunkAdjustment {
 public:





More information about the cfe-commits mailing list