1 //===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief Forward declares and imports various common LLVM datatypes that
12 /// clang wants to use unqualified.
14 //===----------------------------------------------------------------------===//
16 #ifndef CLANG_BASIC_LLVM_H
17 #define CLANG_BASIC_LLVM_H
19 // Do not proliferate #includes here, require clients to #include their
21 // Casting.h has complex templates that cannot be easily forward declared.
22 #include "llvm/Support/Casting.h"
23 // None.h includes an enumerator that is desired & cannot be forward declared
24 // without a definition of NoneType.
25 #include "llvm/ADT/None.h"
31 template<typename T> class ArrayRef;
32 template<typename T> class OwningPtr;
33 template<unsigned InternalLen> class SmallString;
34 template<typename T, unsigned N> class SmallVector;
35 template<typename T> class SmallVectorImpl;
36 template<typename T> class Optional;
39 struct SaveAndRestore;
41 // Reference counting.
42 template <typename T> class IntrusiveRefCntPtr;
43 template <typename T> struct IntrusiveRefCntPtrInfo;
44 template <class Derived> class RefCountedBase;
45 class RefCountedBaseVPTR;
48 // TODO: DenseMap, ...
57 using llvm::dyn_cast_or_null;
58 using llvm::cast_or_null;
63 using llvm::StringRef;
66 using llvm::OwningPtr;
67 using llvm::SmallString;
68 using llvm::SmallVector;
69 using llvm::SmallVectorImpl;
70 using llvm::SaveAndRestore;
72 // Reference counting.
73 using llvm::IntrusiveRefCntPtr;
74 using llvm::IntrusiveRefCntPtrInfo;
75 using llvm::RefCountedBase;
76 using llvm::RefCountedBaseVPTR;
78 using llvm::raw_ostream;
79 } // end namespace clang.