Make a few headers standalone. Plus, add a missing "template" keyword
authorDouglas Gregor <dgregor@apple.com>
Thu, 5 Nov 2009 13:30:28 +0000 (13:30 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 5 Nov 2009 13:30:28 +0000 (13:30 +0000)
that Clang diagnoses but GCC does not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86130 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Format.h
include/llvm/Support/LeakDetector.h
include/llvm/Support/OutputBuffer.h
include/llvm/Support/PassNameParser.h
include/llvm/Support/RecyclingAllocator.h

index df03f66ddc7d1ea09ec7290b77510d12e228cf4e..340f51735e8e39eded9046fbe18aa4301a15376c 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef LLVM_SUPPORT_FORMAT_H
 #define LLVM_SUPPORT_FORMAT_H
 
+#include <cassert>
 #include <cstdio>
 #ifdef WIN32
 #define snprintf _snprintf
index 7dbfdbf3d52b2844acbb78359be59df2a0d33a77..501a9db72c154b437c5d776f2777b7d218f4f502 100644 (file)
@@ -26,6 +26,7 @@
 
 namespace llvm {
 
+class LLVMContext;
 class Value;
 
 struct LeakDetector {
index 1adff2d27052845169dbd713721ab3ea26fc6fd4..6b98e99e28e06face9cbef5997206ee4d9e5a5a5 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef LLVM_SUPPORT_OUTPUTBUFFER_H
 #define LLVM_SUPPORT_OUTPUTBUFFER_H
 
+#include <cassert>
 #include <string>
 #include <vector>
 
index 66ce3f2e2085c1c67e6c9d38946371431911a177..ea4fe01f78d7c594cc2ebcdc1352a121a973728e 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Pass.h"
 #include <algorithm>
 #include <cstring>
index 8e957f1b26453de00b74c4821e0439d495941120..609193ffd7624835ad1470b9c504fc99faec88a6 100644 (file)
@@ -41,7 +41,7 @@ public:
   /// SubClass. The storage may be either newly allocated or recycled.
   ///
   template<class SubClass>
-  SubClass *Allocate() { return Base.Allocate<SubClass>(Allocator); }
+  SubClass *Allocate() { return Base.template Allocate<SubClass>(Allocator); }
 
   T *Allocate() { return Base.Allocate(Allocator); }