Skip to content

Commit 969db4d

Browse files
author
Georgios Rokos
committed
Merge from '"main"' to '"sycl-web"' (1 commits)
CONFLICT (content): Merge conflict in llvm/unittests/Passes/CMakeLists.txt
2 parents 274360b + 28ef805 commit 969db4d

File tree

215 files changed

+8642
-19520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+8642
-19520
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Windows (from within the clang\docs directory):
2323
// make.bat html
2424
// Non-Windows (from within the clang\docs directory):
25-
// make -f Makefile.sphinx html
25+
// sphinx-build -b html _build/html
2626

2727
def GlobalDocumentation {
2828
code Intro =[{..

clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ class RangeSet {
282282
/// where N = size(this)
283283
bool contains(llvm::APSInt Point) const { return containsImpl(Point); }
284284

285+
bool containsZero() const {
286+
APSIntType T{getMinValue()};
287+
return contains(T.getZeroValue());
288+
}
289+
285290
void dump(raw_ostream &OS) const;
286291
void dump() const;
287292

clang/lib/AST/ASTImporter.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3428,11 +3428,14 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
34283428
return std::move(Err);
34293429

34303430
QualType FromTy = D->getType();
3431+
TypeSourceInfo *FromTSI = D->getTypeSourceInfo();
34313432
// Set to true if we do not import the type of the function as is. There are
34323433
// cases when the original type would result in an infinite recursion during
34333434
// the import. To avoid an infinite recursion when importing, we create the
34343435
// FunctionDecl with a simplified function type and update it only after the
34353436
// relevant AST nodes are already imported.
3437+
// The type is related to TypeSourceInfo (it references the type), so we must
3438+
// do the same with TypeSourceInfo.
34363439
bool UsedDifferentProtoType = false;
34373440
if (const auto *FromFPT = FromTy->getAs<FunctionProtoType>()) {
34383441
QualType FromReturnTy = FromFPT->getReturnType();
@@ -3459,11 +3462,13 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
34593462
}
34603463
FromTy = Importer.getFromContext().getFunctionType(
34613464
FromReturnTy, FromFPT->getParamTypes(), FromEPI);
3465+
FromTSI = Importer.getFromContext().getTrivialTypeSourceInfo(
3466+
FromTy, D->getBeginLoc());
34623467
}
34633468

34643469
Error Err = Error::success();
34653470
auto T = importChecked(Err, FromTy);
3466-
auto TInfo = importChecked(Err, D->getTypeSourceInfo());
3471+
auto TInfo = importChecked(Err, FromTSI);
34673472
auto ToInnerLocStart = importChecked(Err, D->getInnerLocStart());
34683473
auto ToEndLoc = importChecked(Err, D->getEndLoc());
34693474
auto ToQualifierLoc = importChecked(Err, D->getQualifierLoc());
@@ -3641,6 +3646,10 @@ ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
36413646
ToFunction->setType(*TyOrErr);
36423647
else
36433648
return TyOrErr.takeError();
3649+
if (Expected<TypeSourceInfo *> TSIOrErr = import(D->getTypeSourceInfo()))
3650+
ToFunction->setTypeSourceInfo(*TSIOrErr);
3651+
else
3652+
return TSIOrErr.takeError();
36443653
}
36453654

36463655
// FIXME: Other bits to merge?

clang/lib/Driver/ToolChains/BareMetal.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ static bool isARMBareMetal(const llvm::Triple &Triple) {
125125
return true;
126126
}
127127

128+
/// Is the triple aarch64-none-elf?
129+
static bool isAArch64BareMetal(const llvm::Triple &Triple) {
130+
if (Triple.getArch() != llvm::Triple::aarch64)
131+
return false;
132+
133+
if (Triple.getVendor() != llvm::Triple::UnknownVendor)
134+
return false;
135+
136+
if (Triple.getOS() != llvm::Triple::UnknownOS)
137+
return false;
138+
139+
return Triple.getEnvironmentName() == "elf";
140+
}
141+
128142
static bool isRISCVBareMetal(const llvm::Triple &Triple) {
129143
if (Triple.getArch() != llvm::Triple::riscv32 &&
130144
Triple.getArch() != llvm::Triple::riscv64)
@@ -151,7 +165,8 @@ void BareMetal::findMultilibs(const Driver &D, const llvm::Triple &Triple,
151165
}
152166

153167
bool BareMetal::handlesTarget(const llvm::Triple &Triple) {
154-
return isARMBareMetal(Triple) || isRISCVBareMetal(Triple);
168+
return isARMBareMetal(Triple) || isAArch64BareMetal(Triple) ||
169+
isRISCVBareMetal(Triple);
155170
}
156171

157172
Tool *BareMetal::buildLinker() const {

0 commit comments

Comments
 (0)