Speculatively attempt to fix the MSVC build by making some
authorJohn McCall <rjmccall@apple.com>
Fri, 11 Mar 2016 04:55:21 +0000 (04:55 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 11 Mar 2016 04:55:21 +0000 (04:55 +0000)
methods non-private.

llvm-svn: 263193

clang/include/clang/CodeGen/CGFunctionInfo.h

index d8de16a..b532c79 100644 (file)
@@ -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;