clang 23.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// Add this header as a workaround to prevent `too few template arguments for
23// class template 'SmallVector'` building error with build compilers like XL.
24#include "llvm/ADT/SmallVector.h"
25
26namespace 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<unsigned InternalLen> class SmallString;
34 template<typename T, unsigned N> class SmallVector;
35 template<typename T> class SmallVectorImpl;
36 template <class T> class Expected;
37
38 template<typename T>
40
41 // Reference counting.
42 template <typename T> class IntrusiveRefCntPtr;
43 template <typename T> struct IntrusiveRefCntPtrInfo;
44 template <class Derived> class RefCountedBase;
45
46 class raw_ostream;
47 class raw_pwrite_stream;
48 // TODO: DenseMap, ...
49}
50
51
52namespace clang {
53 // Casting operators.
54 using llvm::isa;
55 using llvm::isa_and_nonnull;
56 using llvm::isa_and_present;
57 using llvm::cast;
58 using llvm::dyn_cast;
59 using llvm::dyn_cast_or_null;
60 using llvm::dyn_cast_if_present;
61 using llvm::cast_or_null;
62 using llvm::cast_if_present;
63
64 // ADT's.
65 using llvm::ArrayRef;
71 using llvm::StringRef;
72 using llvm::Twine;
73 using llvm::VersionTuple;
74
75 // Error handling.
76 using llvm::Expected;
77
78 // Reference counting.
82
83 using llvm::raw_ostream;
84 using llvm::raw_pwrite_stream;
85} // end namespace clang.
86
87#endif
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
Definition Dominators.h:30