1 //===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Forward-declares and imports various common LLVM datatypes that
11 /// clang wants to use unqualified.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_BASIC_LLVM_H
16 #define LLVM_CLANG_BASIC_LLVM_H
18 // Do not proliferate #includes here, require clients to #include their
20 // Casting.h has complex templates that cannot be easily forward declared.
21 #include "llvm/Support/Casting.h"
22 // None.h includes an enumerator that is desired & cannot be forward declared
23 // without a definition of NoneType.
24 #include "llvm/ADT/None.h"
31 template<typename T> class ArrayRef;
32 template<typename T> class MutableArrayRef;
33 template<typename T> class OwningArrayRef;
34 template<unsigned InternalLen> class SmallString;
35 template<typename T, unsigned N> class SmallVector;
36 template<typename T> class SmallVectorImpl;
37 template<typename T> class Optional;
38 template <class T> class Expected;
41 struct SaveAndRestore;
43 // Reference counting.
44 template <typename T> class IntrusiveRefCntPtr;
45 template <typename T> struct IntrusiveRefCntPtrInfo;
46 template <class Derived> class RefCountedBase;
49 class raw_pwrite_stream;
50 // TODO: DenseMap, ...
59 using llvm::dyn_cast_or_null;
60 using llvm::cast_or_null;
64 using llvm::MutableArrayRef;
67 using llvm::OwningArrayRef;
68 using llvm::SaveAndRestore;
69 using llvm::SmallString;
70 using llvm::SmallVector;
71 using llvm::SmallVectorImpl;
72 using llvm::StringRef;
74 using llvm::VersionTuple;
79 // Reference counting.
80 using llvm::IntrusiveRefCntPtr;
81 using llvm::IntrusiveRefCntPtrInfo;
82 using llvm::RefCountedBase;
84 using llvm::raw_ostream;
85 using llvm::raw_pwrite_stream;
86 } // end namespace clang.