clang 10.0.0git

LLVM.h
Go to the documentation of this file.
1 //===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Forward-declares and imports various common LLVM datatypes that
11 /// clang wants to use unqualified.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CLANG_BASIC_LLVM_H
16 #define LLVM_CLANG_BASIC_LLVM_H
17
18 // Do not proliferate #includes here, require clients to #include their
19 // dependencies.
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"
25
26 namespace llvm {
27 // ADT's.
28 class StringRef;
29 class Twine;
30 class VersionTuple;
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;
39
40 template<typename T>
41 struct SaveAndRestore;
42
43 // Reference counting.
44 template <typename T> class IntrusiveRefCntPtr;
45 template <typename T> struct IntrusiveRefCntPtrInfo;
46 template <class Derived> class RefCountedBase;
47
48 class raw_ostream;
49 class raw_pwrite_stream;
50 // TODO: DenseMap, ...
51 }
52
53
54 namespace clang {
55 // Casting operators.
56 using llvm::isa;
57 using llvm::cast;
58 using llvm::dyn_cast;
59 using llvm::dyn_cast_or_null;
60 using llvm::cast_or_null;
61
62 // ADT's.
63 using llvm::ArrayRef;
64 using llvm::MutableArrayRef;
65 using llvm::None;
66 using llvm::Optional;
67 using llvm::OwningArrayRef;
68 using llvm::SaveAndRestore;
69 using llvm::SmallString;
70 using llvm::SmallVector;
71 using llvm::SmallVectorImpl;
72 using llvm::StringRef;
73 using llvm::Twine;
74 using llvm::VersionTuple;
75
76 // Error handling.
77 using llvm::Expected;
78
79 // Reference counting.
80 using llvm::IntrusiveRefCntPtr;
81 using llvm::IntrusiveRefCntPtrInfo;
82 using llvm::RefCountedBase;
83
84 using llvm::raw_ostream;
85 using llvm::raw_pwrite_stream;
86 } // end namespace clang.
87
88 #endif
llvm
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
Definition: Dominators.h:30
Expected
llvm::Expected< T > Expected
Definition: ByteCodeExprGen.cpp:22
Optional
llvm::Optional< T > Optional
Definition: ByteCodeExprGen.cpp:23
llvm::Optional
Definition: LLVM.h:37
llvm::IntrusiveRefCntPtrInfo
Definition: LLVM.h:45
llvm::SmallVectorImpl
Definition: LLVM.h:36
llvm::Expected
Definition: LLVM.h:38
llvm::RefCountedBase
Definition: LLVM.h:46
llvm::ArrayRef
Definition: LLVM.h:31
llvm::SmallString
Definition: LLVM.h:34
llvm::MutableArrayRef
Definition: LLVM.h:32
clang::isa
bool isa(CodeGen::Address addr)
Definition: Address.h:111
llvm::IntrusiveRefCntPtr
Definition: LLVM.h:44
llvm::OwningArrayRef
Definition: LLVM.h:33
llvm::SmallVector
Definition: LLVM.h:35
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
llvm::SaveAndRestore
Definition: LLVM.h:41
clang::cast
U cast(CodeGen::Address addr)
Definition: Address.h:108