[Clang] Move ParsedTargetAttr to TargetInfo.h

This moves the struct, as it is now parsed by TargetInfo, so avoiding
some includes of AST in Basic.
This commit is contained in:
David Green 2022-10-01 18:26:42 +01:00
parent 557a19ab0f
commit d7804e187a
4 changed files with 14 additions and 17 deletions

View File

@ -362,20 +362,6 @@ public:
static_assert(sizeof(ParamIdx) == sizeof(ParamIdx::SerialType),
"ParamIdx does not fit its serialization type");
/// Contains information gathered from parsing the contents of TargetAttr.
struct ParsedTargetAttr {
std::vector<std::string> Features;
StringRef CPU;
StringRef Tune;
StringRef BranchProtection;
StringRef Duplicate;
bool operator ==(const ParsedTargetAttr &Other) const {
return Duplicate == Other.Duplicate && CPU == Other.CPU &&
Tune == Other.Tune && BranchProtection == Other.BranchProtection &&
Features == Other.Features;
}
};
#include "clang/AST/Attrs.inc"
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,

View File

@ -49,7 +49,20 @@ class DiagnosticsEngine;
class LangOptions;
class CodeGenOptions;
class MacroBuilder;
struct ParsedTargetAttr;
/// Contains information gathered from parsing the contents of TargetAttr.
struct ParsedTargetAttr {
std::vector<std::string> Features;
StringRef CPU;
StringRef Tune;
StringRef BranchProtection;
StringRef Duplicate;
bool operator ==(const ParsedTargetAttr &Other) const {
return Duplicate == Other.Duplicate && CPU == Other.CPU &&
Tune == Other.Tune && BranchProtection == Other.BranchProtection &&
Features == Other.Features;
}
};
namespace Builtin { struct Info; }

View File

@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//
#include "clang/Basic/TargetInfo.h"
#include "clang/AST/Attr.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/Diagnostic.h"

View File

@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//
#include "AArch64.h"
#include "clang/AST/Attr.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"