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 /// Forward-declares and imports various common LLVM datatypes that
12 /// clang wants to use unqualified.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_CLANG_BASIC_LLVM_H
17 #define LLVM_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"
32 template<typename T> class ArrayRef;
33 template<typename T> class MutableArrayRef;
34 template<typename T> class OwningArrayRef;
35 template<unsigned InternalLen> class SmallString;
36 template<typename T, unsigned N> class SmallVector;
37 template<typename T> class SmallVectorImpl;
38 template<typename T> class Optional;
39 template <class T> class Expected;
42 struct SaveAndRestore;
44 // Reference counting.
45 template <typename T> class IntrusiveRefCntPtr;
46 template <typename T> struct IntrusiveRefCntPtrInfo;
47 template <class Derived> class RefCountedBase;
50 class raw_pwrite_stream;
51 // TODO: DenseMap, ...
60 using llvm::dyn_cast_or_null;
61 using llvm::cast_or_null;
65 using llvm::MutableArrayRef;
68 using llvm::OwningArrayRef;
69 using llvm::SaveAndRestore;
70 using llvm::SmallString;
71 using llvm::SmallVector;
72 using llvm::SmallVectorImpl;
73 using llvm::StringRef;
75 using llvm::VersionTuple;
80 // Reference counting.
81 using llvm::IntrusiveRefCntPtr;
82 using llvm::IntrusiveRefCntPtrInfo;
83 using llvm::RefCountedBase;
85 using llvm::raw_ostream;
86 using llvm::raw_pwrite_stream;
87 } // end namespace clang.