Vendor import of clang release_90 branch r370514:
https://llvm.org/svn/llvm-project/cfe/branches/release_90@370514
This commit is contained in:
parent
e489f4451b
commit
24632cab8a
@ -165,7 +165,7 @@ LANGSTANDARD(opencl12, "cl1.2",
|
||||
LANGSTANDARD(opencl20, "cl2.0",
|
||||
OpenCL, "OpenCL 2.0",
|
||||
LineComment | C99 | Digraphs | HexFloat | OpenCL)
|
||||
LANGSTANDARD(openclcpp, "c++",
|
||||
LANGSTANDARD(openclcpp, "clc++",
|
||||
OpenCL, "C++ for OpenCL",
|
||||
LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
|
||||
Digraphs | HexFloat | OpenCL)
|
||||
|
@ -60,6 +60,10 @@ bool RISCVTargetInfo::validateAsmConstraint(
|
||||
// A floating-point register.
|
||||
Info.setAllowsRegister();
|
||||
return true;
|
||||
case 'A':
|
||||
// An address that is held in a general-purpose register.
|
||||
Info.setAllowsMemory();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,13 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void setMaxAtomicWidth() override {
|
||||
MaxAtomicPromoteWidth = 128;
|
||||
|
||||
if (HasA)
|
||||
MaxAtomicInlineWidth = 32;
|
||||
}
|
||||
};
|
||||
class LLVM_LIBRARY_VISIBILITY RISCV64TargetInfo : public RISCVTargetInfo {
|
||||
public:
|
||||
@ -110,6 +117,13 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void setMaxAtomicWidth() override {
|
||||
MaxAtomicPromoteWidth = 128;
|
||||
|
||||
if (HasA)
|
||||
MaxAtomicInlineWidth = 64;
|
||||
}
|
||||
};
|
||||
} // namespace targets
|
||||
} // namespace clang
|
||||
|
@ -15350,7 +15350,7 @@ ndrange_t __ovld ndrange_3D(const size_t[3]);
|
||||
ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3]);
|
||||
ndrange_t __ovld ndrange_3D(const size_t[3], const size_t[3], const size_t[3]);
|
||||
|
||||
int __ovld enqueue_marker(queue_t, uint, const __private clk_event_t*, __private clk_event_t*);
|
||||
int __ovld enqueue_marker(queue_t, uint, const clk_event_t*, clk_event_t*);
|
||||
|
||||
void __ovld retain_event(clk_event_t);
|
||||
|
||||
|
@ -1225,7 +1225,8 @@ static bool checkTupleLikeDecomposition(Sema &S,
|
||||
if (E.isInvalid())
|
||||
return true;
|
||||
RefVD->setInit(E.get());
|
||||
RefVD->checkInitIsICE();
|
||||
if (!E.get()->isValueDependent())
|
||||
RefVD->checkInitIsICE();
|
||||
|
||||
E = S.BuildDeclarationNameExpr(CXXScopeSpec(),
|
||||
DeclarationNameInfo(B->getDeclName(), Loc),
|
||||
|
@ -4692,6 +4692,7 @@ SubstDefaultTemplateArgument(Sema &SemaRef,
|
||||
for (unsigned i = 0, e = Param->getDepth(); i != e; ++i)
|
||||
TemplateArgLists.addOuterTemplateArguments(None);
|
||||
|
||||
Sema::ContextRAII SavedContext(SemaRef, Template->getDeclContext());
|
||||
EnterExpressionEvaluationContext ConstantEvaluated(
|
||||
SemaRef, Sema::ExpressionEvaluationContext::ConstantEvaluated);
|
||||
return SemaRef.SubstExpr(Param->getDefaultArgument(), TemplateArgLists);
|
||||
|
@ -7390,8 +7390,22 @@ static void deduceOpenCLImplicitAddrSpace(TypeProcessingState &State,
|
||||
bool IsPointee =
|
||||
ChunkIndex > 0 &&
|
||||
(D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Pointer ||
|
||||
D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::BlockPointer ||
|
||||
D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Reference);
|
||||
D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Reference ||
|
||||
D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::BlockPointer);
|
||||
// For pointers/references to arrays the next chunk is always an array
|
||||
// followed by any number of parentheses.
|
||||
if (!IsPointee && ChunkIndex > 1) {
|
||||
auto AdjustedCI = ChunkIndex - 1;
|
||||
if (D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Array)
|
||||
AdjustedCI--;
|
||||
// Skip over all parentheses.
|
||||
while (AdjustedCI > 0 &&
|
||||
D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Paren)
|
||||
AdjustedCI--;
|
||||
if (D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Pointer ||
|
||||
D.getTypeObject(AdjustedCI).Kind == DeclaratorChunk::Reference)
|
||||
IsPointee = true;
|
||||
}
|
||||
bool IsFuncReturnType =
|
||||
ChunkIndex > 0 &&
|
||||
D.getTypeObject(ChunkIndex - 1).Kind == DeclaratorChunk::Function;
|
||||
|
Loading…
x
Reference in New Issue
Block a user