Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release). PR: 244251 MFC after: 6 weeks X-MFC-With: 358851
This commit is contained in:
commit
aec4c088fd
@ -6885,7 +6885,8 @@ class Sema final {
|
|||||||
QualType ObjectType, bool EnteringContext,
|
QualType ObjectType, bool EnteringContext,
|
||||||
bool &MemberOfUnknownSpecialization,
|
bool &MemberOfUnknownSpecialization,
|
||||||
SourceLocation TemplateKWLoc = SourceLocation(),
|
SourceLocation TemplateKWLoc = SourceLocation(),
|
||||||
AssumedTemplateKind *ATK = nullptr);
|
AssumedTemplateKind *ATK = nullptr,
|
||||||
|
bool Disambiguation = false);
|
||||||
|
|
||||||
TemplateNameKind isTemplateName(Scope *S,
|
TemplateNameKind isTemplateName(Scope *S,
|
||||||
CXXScopeSpec &SS,
|
CXXScopeSpec &SS,
|
||||||
@ -6894,7 +6895,8 @@ class Sema final {
|
|||||||
ParsedType ObjectType,
|
ParsedType ObjectType,
|
||||||
bool EnteringContext,
|
bool EnteringContext,
|
||||||
TemplateTy &Template,
|
TemplateTy &Template,
|
||||||
bool &MemberOfUnknownSpecialization);
|
bool &MemberOfUnknownSpecialization,
|
||||||
|
bool Disambiguation = false);
|
||||||
|
|
||||||
/// Try to resolve an undeclared template name as a type template.
|
/// Try to resolve an undeclared template name as a type template.
|
||||||
///
|
///
|
||||||
|
@ -32,24 +32,28 @@ using namespace llvm::opt;
|
|||||||
|
|
||||||
// Parses the contents of version.txt in an CUDA installation. It should
|
// Parses the contents of version.txt in an CUDA installation. It should
|
||||||
// contain one line of the from e.g. "CUDA Version 7.5.2".
|
// contain one line of the from e.g. "CUDA Version 7.5.2".
|
||||||
static CudaVersion ParseCudaVersionFile(const Driver &D, llvm::StringRef V) {
|
void CudaInstallationDetector::ParseCudaVersionFile(llvm::StringRef V) {
|
||||||
|
Version = CudaVersion::UNKNOWN;
|
||||||
if (!V.startswith("CUDA Version "))
|
if (!V.startswith("CUDA Version "))
|
||||||
return CudaVersion::UNKNOWN;
|
return;
|
||||||
V = V.substr(strlen("CUDA Version "));
|
V = V.substr(strlen("CUDA Version "));
|
||||||
SmallVector<StringRef,4> VersionParts;
|
SmallVector<StringRef,4> VersionParts;
|
||||||
V.split(VersionParts, '.');
|
V.split(VersionParts, '.');
|
||||||
if (VersionParts.size() < 2)
|
if (VersionParts.size() < 2)
|
||||||
return CudaVersion::UNKNOWN;
|
return;
|
||||||
std::string MajorMinor = join_items(".", VersionParts[0], VersionParts[1]);
|
DetectedVersion = join_items(".", VersionParts[0], VersionParts[1]);
|
||||||
CudaVersion Version = CudaStringToVersion(MajorMinor);
|
Version = CudaStringToVersion(DetectedVersion);
|
||||||
if (Version != CudaVersion::UNKNOWN)
|
if (Version != CudaVersion::UNKNOWN)
|
||||||
return Version;
|
return;
|
||||||
|
|
||||||
// Issue a warning and assume that the version we've found is compatible with
|
Version = CudaVersion::LATEST;
|
||||||
// the latest version we support.
|
DetectedVersionIsNotSupported = true;
|
||||||
D.Diag(diag::warn_drv_unknown_cuda_version)
|
}
|
||||||
<< MajorMinor << CudaVersionToString(CudaVersion::LATEST);
|
|
||||||
return CudaVersion::LATEST;
|
void CudaInstallationDetector::WarnIfUnsupportedVersion() {
|
||||||
|
if (DetectedVersionIsNotSupported)
|
||||||
|
D.Diag(diag::warn_drv_unknown_cuda_version)
|
||||||
|
<< DetectedVersion << CudaVersionToString(Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
CudaInstallationDetector::CudaInstallationDetector(
|
CudaInstallationDetector::CudaInstallationDetector(
|
||||||
@ -147,7 +151,7 @@ CudaInstallationDetector::CudaInstallationDetector(
|
|||||||
// version.txt isn't present.
|
// version.txt isn't present.
|
||||||
Version = CudaVersion::CUDA_70;
|
Version = CudaVersion::CUDA_70;
|
||||||
} else {
|
} else {
|
||||||
Version = ParseCudaVersionFile(D, (*VersionFile)->getBuffer());
|
ParseCudaVersionFile((*VersionFile)->getBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Version >= CudaVersion::CUDA_90) {
|
if (Version >= CudaVersion::CUDA_90) {
|
||||||
@ -565,8 +569,10 @@ CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple,
|
|||||||
const Action::OffloadKind OK)
|
const Action::OffloadKind OK)
|
||||||
: ToolChain(D, Triple, Args), HostTC(HostTC),
|
: ToolChain(D, Triple, Args), HostTC(HostTC),
|
||||||
CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) {
|
CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) {
|
||||||
if (CudaInstallation.isValid())
|
if (CudaInstallation.isValid()) {
|
||||||
|
CudaInstallation.WarnIfUnsupportedVersion();
|
||||||
getProgramPaths().push_back(CudaInstallation.getBinPath());
|
getProgramPaths().push_back(CudaInstallation.getBinPath());
|
||||||
|
}
|
||||||
// Lookup binaries into the driver directory, this is used to
|
// Lookup binaries into the driver directory, this is used to
|
||||||
// discover the clang-offload-bundler executable.
|
// discover the clang-offload-bundler executable.
|
||||||
getProgramPaths().push_back(getDriver().Dir);
|
getProgramPaths().push_back(getDriver().Dir);
|
||||||
|
@ -30,6 +30,8 @@ class CudaInstallationDetector {
|
|||||||
const Driver &D;
|
const Driver &D;
|
||||||
bool IsValid = false;
|
bool IsValid = false;
|
||||||
CudaVersion Version = CudaVersion::UNKNOWN;
|
CudaVersion Version = CudaVersion::UNKNOWN;
|
||||||
|
std::string DetectedVersion;
|
||||||
|
bool DetectedVersionIsNotSupported = false;
|
||||||
std::string InstallPath;
|
std::string InstallPath;
|
||||||
std::string BinPath;
|
std::string BinPath;
|
||||||
std::string LibPath;
|
std::string LibPath;
|
||||||
@ -75,6 +77,10 @@ class CudaInstallationDetector {
|
|||||||
std::string getLibDeviceFile(StringRef Gpu) const {
|
std::string getLibDeviceFile(StringRef Gpu) const {
|
||||||
return LibDeviceMap.lookup(Gpu);
|
return LibDeviceMap.lookup(Gpu);
|
||||||
}
|
}
|
||||||
|
void WarnIfUnsupportedVersion();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void ParseCudaVersionFile(llvm::StringRef V);
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace tools {
|
namespace tools {
|
||||||
|
@ -3252,6 +3252,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
|
|||||||
goto DoneWithDeclSpec;
|
goto DoneWithDeclSpec;
|
||||||
if (isTypeConstraintAnnotation())
|
if (isTypeConstraintAnnotation())
|
||||||
continue;
|
continue;
|
||||||
|
if (NextToken().is(tok::annot_template_id))
|
||||||
|
// Might have been annotated by TryAnnotateTypeConstraint.
|
||||||
|
continue;
|
||||||
// Eat the scope spec so the identifier is current.
|
// Eat the scope spec so the identifier is current.
|
||||||
ConsumeAnnotationToken();
|
ConsumeAnnotationToken();
|
||||||
ParsedAttributesWithRange Attrs(AttrFactory);
|
ParsedAttributesWithRange Attrs(AttrFactory);
|
||||||
@ -3405,6 +3408,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
|
|||||||
goto DoneWithDeclSpec;
|
goto DoneWithDeclSpec;
|
||||||
if (isTypeConstraintAnnotation())
|
if (isTypeConstraintAnnotation())
|
||||||
continue;
|
continue;
|
||||||
|
if (Tok.is(tok::annot_template_id))
|
||||||
|
// Might have been annotated by TryAnnotateTypeConstraint.
|
||||||
|
continue;
|
||||||
ParsedAttributesWithRange Attrs(AttrFactory);
|
ParsedAttributesWithRange Attrs(AttrFactory);
|
||||||
if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) {
|
if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) {
|
||||||
if (!Attrs.empty()) {
|
if (!Attrs.empty()) {
|
||||||
|
@ -710,7 +710,8 @@ bool Parser::TryAnnotateTypeConstraint() {
|
|||||||
/*ObjectType=*/ParsedType(),
|
/*ObjectType=*/ParsedType(),
|
||||||
/*EnteringContext=*/false,
|
/*EnteringContext=*/false,
|
||||||
PossibleConcept,
|
PossibleConcept,
|
||||||
MemberOfUnknownSpecialization);
|
MemberOfUnknownSpecialization,
|
||||||
|
/*Disambiguation=*/true);
|
||||||
if (MemberOfUnknownSpecialization || !PossibleConcept ||
|
if (MemberOfUnknownSpecialization || !PossibleConcept ||
|
||||||
TNK != TNK_Concept_template) {
|
TNK != TNK_Concept_template) {
|
||||||
if (SS.isNotEmpty())
|
if (SS.isNotEmpty())
|
||||||
|
@ -174,7 +174,8 @@ TemplateNameKind Sema::isTemplateName(Scope *S,
|
|||||||
ParsedType ObjectTypePtr,
|
ParsedType ObjectTypePtr,
|
||||||
bool EnteringContext,
|
bool EnteringContext,
|
||||||
TemplateTy &TemplateResult,
|
TemplateTy &TemplateResult,
|
||||||
bool &MemberOfUnknownSpecialization) {
|
bool &MemberOfUnknownSpecialization,
|
||||||
|
bool Disambiguation) {
|
||||||
assert(getLangOpts().CPlusPlus && "No template names in C!");
|
assert(getLangOpts().CPlusPlus && "No template names in C!");
|
||||||
|
|
||||||
DeclarationName TName;
|
DeclarationName TName;
|
||||||
@ -204,7 +205,7 @@ TemplateNameKind Sema::isTemplateName(Scope *S,
|
|||||||
LookupResult R(*this, TName, Name.getBeginLoc(), LookupOrdinaryName);
|
LookupResult R(*this, TName, Name.getBeginLoc(), LookupOrdinaryName);
|
||||||
if (LookupTemplateName(R, S, SS, ObjectType, EnteringContext,
|
if (LookupTemplateName(R, S, SS, ObjectType, EnteringContext,
|
||||||
MemberOfUnknownSpecialization, SourceLocation(),
|
MemberOfUnknownSpecialization, SourceLocation(),
|
||||||
&AssumedTemplate))
|
&AssumedTemplate, Disambiguation))
|
||||||
return TNK_Non_template;
|
return TNK_Non_template;
|
||||||
|
|
||||||
if (AssumedTemplate != AssumedTemplateKind::None) {
|
if (AssumedTemplate != AssumedTemplateKind::None) {
|
||||||
@ -371,7 +372,8 @@ bool Sema::LookupTemplateName(LookupResult &Found,
|
|||||||
bool EnteringContext,
|
bool EnteringContext,
|
||||||
bool &MemberOfUnknownSpecialization,
|
bool &MemberOfUnknownSpecialization,
|
||||||
SourceLocation TemplateKWLoc,
|
SourceLocation TemplateKWLoc,
|
||||||
AssumedTemplateKind *ATK) {
|
AssumedTemplateKind *ATK,
|
||||||
|
bool Disambiguation) {
|
||||||
if (ATK)
|
if (ATK)
|
||||||
*ATK = AssumedTemplateKind::None;
|
*ATK = AssumedTemplateKind::None;
|
||||||
|
|
||||||
@ -494,8 +496,9 @@ bool Sema::LookupTemplateName(LookupResult &Found,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Found.empty() && !IsDependent) {
|
if (Found.empty() && !IsDependent && !Disambiguation) {
|
||||||
// If we did not find any names, attempt to correct any typos.
|
// If we did not find any names, and this is not a disambiguation, attempt
|
||||||
|
// to correct any typos.
|
||||||
DeclarationName Name = Found.getLookupName();
|
DeclarationName Name = Found.getLookupName();
|
||||||
Found.clear();
|
Found.clear();
|
||||||
// Simple filter callback that, for keywords, only accepts the C++ *_cast
|
// Simple filter callback that, for keywords, only accepts the C++ *_cast
|
||||||
|
@ -11303,7 +11303,7 @@ TreeTransform<Derived>::TransformRequiresExpr(RequiresExpr *E) {
|
|||||||
SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
|
SemaRef, Sema::ExpressionEvaluationContext::Unevaluated);
|
||||||
|
|
||||||
RequiresExprBodyDecl *Body = RequiresExprBodyDecl::Create(
|
RequiresExprBodyDecl *Body = RequiresExprBodyDecl::Create(
|
||||||
getSema().Context, E->getBody()->getDeclContext(),
|
getSema().Context, getSema().CurContext,
|
||||||
E->getBody()->getBeginLoc());
|
E->getBody()->getBeginLoc());
|
||||||
|
|
||||||
Sema::ContextRAII SavedContext(getSema(), Body, /*NewThisContext*/false);
|
Sema::ContextRAII SavedContext(getSema(), Body, /*NewThisContext*/false);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
// $FreeBSD$
|
// $FreeBSD$
|
||||||
|
|
||||||
#define LLVM_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca"
|
#define LLVM_REVISION "llvmorg-10.0.0-0-gd32170dbd5b"
|
||||||
#define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
#define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
||||||
|
|
||||||
#define CLANG_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca"
|
#define CLANG_REVISION "llvmorg-10.0.0-0-gd32170dbd5b"
|
||||||
#define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
#define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
||||||
|
|
||||||
// <Upstream revision at import>-<Local identifier in __FreeBSD_version style>
|
// <Upstream revision at import>-<Local identifier in __FreeBSD_version style>
|
||||||
#define LLD_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca-1300007"
|
#define LLD_REVISION "llvmorg-10.0.0-0-gd32170dbd5b-1300007"
|
||||||
#define LLD_REPOSITORY "FreeBSD"
|
#define LLD_REPOSITORY "FreeBSD"
|
||||||
|
|
||||||
#define LLDB_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca"
|
#define LLDB_REVISION "llvmorg-10.0.0-0-gd32170dbd5b"
|
||||||
#define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
#define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
/* $FreeBSD$ */
|
/* $FreeBSD$ */
|
||||||
#define LLVM_REVISION "llvmorg-10.0.0-rc4-5-g52c365aa9ca"
|
#define LLVM_REVISION "llvmorg-10.0.0-0-gd32170dbd5b"
|
||||||
#define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
#define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git"
|
||||||
|
Loading…
Reference in New Issue
Block a user