r263193 - Speculatively attempt to fix the MSVC build by making some

John McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 10 20:55:21 PST 2016


Author: rjmccall
Date: Thu Mar 10 22:55:21 2016
New Revision: 263193

URL: http://llvm.org/viewvc/llvm-project?rev=263193&view=rev
Log:
Speculatively attempt to fix the MSVC build by making some
methods non-private.

Modified:
    cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h

Modified: cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h?rev=263193&r1=263192&r2=263193&view=diff
==============================================================================
--- cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h (original)
+++ cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h Thu Mar 10 22:55:21 2016
@@ -492,14 +492,6 @@ class CGFunctionInfo final
     return getTrailingObjects<ExtParameterInfo>();
   }
 
-  size_t numTrailingObjects(OverloadToken<ArgInfo>) const {
-    return NumArgs + 1;
-  }
-  size_t numTrailingObjects(OverloadToken<ExtParameterInfo>) const {
-    return (HasExtParameterInfos ? NumArgs : 0);
-  }
-  friend class TrailingObjects;
-
   CGFunctionInfo() : Required(RequiredArgs::All) {}
 
 public:
@@ -513,6 +505,15 @@ public:
                                 RequiredArgs required);
   void operator delete(void *p) { ::operator delete(p); }
 
+  // Friending class TrailingObjects is apparently not good enough for MSVC,
+  // so these have to be public.
+  size_t numTrailingObjects(OverloadToken<ArgInfo>) const {
+    return NumArgs + 1;
+  }
+  size_t numTrailingObjects(OverloadToken<ExtParameterInfo>) const {
+    return (HasExtParameterInfos ? NumArgs : 0);
+  }
+
   typedef const ArgInfo *const_arg_iterator;
   typedef ArgInfo *arg_iterator;
 




More information about the cfe-commits mailing list