This has been done before in 2008:
ab13857072
But these things regress easily.
Move some things out of line.
Saves 316 includes + transitive stuff:
316 - ../clang/include/clang/Basic/TargetOptions.h
316 - ../clang/include/clang/Basic/TargetInfo.h
316 - ../clang/include/clang/Basic/TargetCXXABI.h
316 - ../clang/include/clang/Basic/OpenCLOptions.h
316 - ../clang/include/clang/Basic/OpenCLExtensions.def
302 - ../llvm/include/llvm/Target/TargetOptions.h
302 - ../llvm/include/llvm/Support/CodeGen.h
302 - ../llvm/include/llvm/MC/MCTargetOptions.h
302 - ../llvm/include/llvm/ADT/FloatingPointMode.h
302 - ../clang/include/clang/Basic/XRayInstr.h
302 - ../clang/include/clang/Basic/DebugInfoOptions.h
302 - ../clang/include/clang/Basic/CodeGenOptions.h
302 - ../clang/include/clang/Basic/CodeGenOptions.def
257 - ../llvm/include/llvm/Support/Regex.h
79 - ../llvm/include/llvm/ADT/SmallSet.h
68 - MSVCSTL/include/set
66 - ../llvm/include/llvm/ADT/SmallPtrSet.h
62 - ../llvm/include/llvm/ADT/StringSwitch.h
#include "clang/Basic/SanitizerBlacklist.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
-#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/XRayLists.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
namespace llvm {
struct fltSemantics;
+template <typename T, unsigned N> class SmallPtrSet;
} // namespace llvm
class VTableContextBase;
struct BlockVarCopyInit;
-
namespace Builtin {
class Context;
} // namespace Builtin
enum BuiltinTemplateKind : int;
+enum OpenCLTypeKind : uint8_t;
namespace comments {
QualType getBlockDescriptorExtendedType() const;
/// Map an AST Type to an OpenCLTypeKind enum value.
- TargetInfo::OpenCLTypeKind getOpenCLTypeKind(const Type *T) const;
+ OpenCLTypeKind getOpenCLTypeKind(const Type *T) const;
/// Get address space for OpenCL type.
LangAS getOpenCLTypeAddrSpace(const Type *T) const;
return NSCopyingName;
}
- CanQualType getNSUIntegerType() const {
- assert(Target && "Expected target to be initialized");
- const llvm::Triple &T = Target->getTriple();
- // Windows is LLP64 rather than LP64
- if (T.isOSWindows() && T.isArch64Bit())
- return UnsignedLongLongTy;
- return UnsignedLongTy;
- }
+ CanQualType getNSUIntegerType() const;
- CanQualType getNSIntegerType() const {
- assert(Target && "Expected target to be initialized");
- const llvm::Triple &T = Target->getTriple();
- // Windows is LLP64 rather than LP64
- if (T.isOSWindows() && T.isArch64Bit())
- return LongLongTy;
- return LongTy;
- }
+ CanQualType getNSIntegerType() const;
/// Retrieve the identifier 'bool'.
IdentifierInfo *getBoolName() const {
/// Return the alignment (in bytes) of the thrown exception object. This is
/// only meaningful for targets that allocate C++ exceptions in a system
/// runtime, such as those using the Itanium C++ ABI.
- CharUnits getExnObjectAlignment() const {
- return toCharUnitsFromBits(Target->getExnObjectAlignment());
- }
+ CharUnits getExnObjectAlignment() const;
/// Get or compute information about the layout of the specified
/// record (struct/union/class) \p D, which indicates its size and field
unsigned ZeroLengthBitfieldBoundary;
};
+/// OpenCL type kinds.
+enum OpenCLTypeKind : uint8_t {
+ OCLTK_Default,
+ OCLTK_ClkEvent,
+ OCLTK_Event,
+ OCLTK_Image,
+ OCLTK_Pipe,
+ OCLTK_Queue,
+ OCLTK_ReserveID,
+ OCLTK_Sampler,
+};
+
/// Exposes information about the current target.
///
class TargetInfo : public virtual TransferrableTargetInfo,
return getTargetOpts().SupportedOpenCLOptions;
}
- enum OpenCLTypeKind {
- OCLTK_Default,
- OCLTK_ClkEvent,
- OCLTK_Event,
- OCLTK_Image,
- OCLTK_Pipe,
- OCLTK_Queue,
- OCLTK_ReserveID,
- OCLTK_Sampler,
- };
-
/// Get address space for OpenCL type.
virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const;
#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SMTCONSTRAINTMANAGER_H
#include "clang/Basic/JsonSupport.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h"
return toCharUnitsFromBits(Align);
}
+CharUnits ASTContext::getExnObjectAlignment() const {
+ return toCharUnitsFromBits(Target->getExnObjectAlignment());
+}
+
// getTypeInfoDataSizeInChars - Return the size of a type, in
// chars. If the type is a record, its data size is returned. This is
// the size of the memcpy that's performed when assigning this type
return getTagDeclType(BlockDescriptorExtendedType);
}
-TargetInfo::OpenCLTypeKind ASTContext::getOpenCLTypeKind(const Type *T) const {
+OpenCLTypeKind ASTContext::getOpenCLTypeKind(const Type *T) const {
const auto *BT = dyn_cast<BuiltinType>(T);
if (!BT) {
if (isa<PipeType>(T))
- return TargetInfo::OCLTK_Pipe;
+ return OCLTK_Pipe;
- return TargetInfo::OCLTK_Default;
+ return OCLTK_Default;
}
switch (BT->getKind()) {
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
case BuiltinType::Id: \
- return TargetInfo::OCLTK_Image;
+ return OCLTK_Image;
#include "clang/Basic/OpenCLImageTypes.def"
case BuiltinType::OCLClkEvent:
- return TargetInfo::OCLTK_ClkEvent;
+ return OCLTK_ClkEvent;
case BuiltinType::OCLEvent:
- return TargetInfo::OCLTK_Event;
+ return OCLTK_Event;
case BuiltinType::OCLQueue:
- return TargetInfo::OCLTK_Queue;
+ return OCLTK_Queue;
case BuiltinType::OCLReserveID:
- return TargetInfo::OCLTK_ReserveID;
+ return OCLTK_ReserveID;
case BuiltinType::OCLSampler:
- return TargetInfo::OCLTK_Sampler;
+ return OCLTK_Sampler;
default:
- return TargetInfo::OCLTK_Default;
+ return OCLTK_Default;
}
}
return true;
}
+CanQualType ASTContext::getNSUIntegerType() const {
+ assert(Target && "Expected target to be initialized");
+ const llvm::Triple &T = Target->getTriple();
+ // Windows is LLP64 rather than LP64
+ if (T.isOSWindows() && T.isArch64Bit())
+ return UnsignedLongLongTy;
+ return UnsignedLongTy;
+}
+
+CanQualType ASTContext::getNSIntegerType() const {
+ assert(Target && "Expected target to be initialized");
+ const llvm::Triple &T = Target->getTriple();
+ // Windows is LLP64 rather than LP64
+ if (T.isOSWindows() && T.isArch64Bit())
+ return LongLongTy;
+ return LongTy;
+}
+
TypedefDecl *ASTContext::getObjCInstanceTypeDecl() {
if (!ObjCInstanceTypeDecl)
ObjCInstanceTypeDecl =
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/StmtVisitor.h"
+#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/Optional.h"
namespace clang {
#include "PrimType.h"
#include "Program.h"
#include "clang/AST/Expr.h"
+#include "clang/Basic/TargetInfo.h"
using namespace clang;
using namespace clang::interp;
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SanitizerBlacklist.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/XRayLists.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SetVector.h"
#include "PatternInit.h"
#include "CodeGenModule.h"
+#include "clang/Basic/TargetInfo.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Type.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/SourceManager.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/ModuleBuilder.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Parse/ParseAST.h"
//===----------------------------------------------------------------------===//
#include "clang/AST/ASTContext.h"
+#include "clang/Basic/TargetInfo.h"
#include "Cocoa.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclObjC.h"
+#include "clang/Basic/TargetInfo.h"
#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/StringLexer.h"
+#include "clang/Basic/TargetInfo.h"
+
#include <vector>
using namespace lldb_private;
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTFwd.h"
#include "clang/AST/TemplateBase.h"
+#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/SmallVector.h"