Skip to content

Commit a21c843

Browse files
committed
Merge from 'main' to 'sycl-web' (83 commits)
CONFLICT (content): Merge conflict in clang/include/clang/Basic/DiagnosticSemaKinds.td
2 parents e8266fe + eb3f788 commit a21c843

File tree

304 files changed

+14178
-2512
lines changed

Some content is hidden

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

304 files changed

+14178
-2512
lines changed

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class BinaryContext {
323323
if (FileBuildID)
324324
return StringRef(*FileBuildID);
325325

326-
return NoneType();
326+
return None;
327327
}
328328
void setFileBuildID(StringRef ID) { FileBuildID = std::string(ID); }
329329

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ class BinaryFunction {
979979
if (Callback(StringRef(Name)))
980980
return StringRef(Name);
981981

982-
return NoneType();
982+
return None;
983983
}
984984

985985
/// Check if (possibly one out of many) function name matches the given
@@ -1317,7 +1317,7 @@ class BinaryFunction {
13171317
/// Return the name of the section this function originated from.
13181318
Optional<StringRef> getOriginSectionName() const {
13191319
if (!OriginSection)
1320-
return NoneType();
1320+
return None;
13211321
return OriginSection->getName();
13221322
}
13231323

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class MCPlusBuilder {
136136
unsigned Index) const {
137137
const MCInst *AnnotationInst = getAnnotationInst(Inst);
138138
if (!AnnotationInst)
139-
return NoneType();
139+
return None;
140140

141141
for (int I = AnnotationInst->getNumOperands() - 1; I >= 0; --I) {
142142
int64_t ImmValue = AnnotationInst->getOperand(I).getImm();
@@ -145,7 +145,7 @@ class MCPlusBuilder {
145145
}
146146
}
147147

148-
return NoneType();
148+
return None;
149149
}
150150

151151
protected:
@@ -1670,7 +1670,7 @@ class MCPlusBuilder {
16701670
auto AI = AnnotationNameIndexMap.find(Name);
16711671
if (AI != AnnotationNameIndexMap.end())
16721672
return AI->second;
1673-
return NoneType();
1673+
return None;
16741674
}
16751675

16761676
/// Return annotation index matching the \p Name. Create a new index if the

bolt/lib/Core/BinaryContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ BinaryContext::getBaseAddressForMapping(uint64_t MMapAddress,
18981898
}
18991899
}
19001900

1901-
return NoneType();
1901+
return None;
19021902
}
19031903

19041904
ErrorOr<BinarySection &> BinaryContext::getSectionForAddress(uint64_t Address) {

bolt/lib/Core/MCPlusBuilder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ bool MCPlusBuilder::isTailCall(const MCInst &Inst) const {
135135

136136
Optional<MCLandingPad> MCPlusBuilder::getEHInfo(const MCInst &Inst) const {
137137
if (!isCall(Inst))
138-
return NoneType();
138+
return None;
139139
Optional<int64_t> LPSym =
140140
getAnnotationOpValue(Inst, MCAnnotation::kEHLandingPad);
141141
if (!LPSym)
142-
return NoneType();
142+
return None;
143143
Optional<int64_t> Action =
144144
getAnnotationOpValue(Inst, MCAnnotation::kEHAction);
145145
if (!Action)
146-
return NoneType();
146+
return None;
147147

148148
return std::make_pair(reinterpret_cast<const MCSymbol *>(*LPSym),
149149
static_cast<uint64_t>(*Action));
@@ -221,7 +221,7 @@ MCPlusBuilder::getConditionalTailCall(const MCInst &Inst) const {
221221
Optional<int64_t> Value =
222222
getAnnotationOpValue(Inst, MCAnnotation::kConditionalTailCall);
223223
if (!Value)
224-
return NoneType();
224+
return None;
225225
return static_cast<uint64_t>(*Value);
226226
}
227227

@@ -243,7 +243,7 @@ bool MCPlusBuilder::unsetConditionalTailCall(MCInst &Inst) {
243243
Optional<uint32_t> MCPlusBuilder::getOffset(const MCInst &Inst) const {
244244
Optional<int64_t> Value = getAnnotationOpValue(Inst, MCAnnotation::kOffset);
245245
if (!Value)
246-
return NoneType();
246+
return None;
247247
return static_cast<uint32_t>(*Value);
248248
}
249249

bolt/lib/Profile/BoltAddressTranslation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ BoltAddressTranslation::getFallthroughsInTrace(uint64_t FuncAddress,
263263

264264
auto Iter = Maps.find(FuncAddress);
265265
if (Iter == Maps.end())
266-
return NoneType();
266+
return None;
267267

268268
const MapTy &Map = Iter->second;
269269
auto FromIter = Map.upper_bound(From);

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ DataAggregator::getFallthroughsInTrace(BinaryFunction &BF,
943943
SmallVector<std::pair<uint64_t, uint64_t>, 16> Res;
944944

945945
if (!recordTrace(BF, FirstLBR, SecondLBR, Count, &Res))
946-
return NoneType();
946+
return None;
947947

948948
return Res;
949949
}
@@ -1820,13 +1820,13 @@ Optional<int32_t> DataAggregator::parseCommExecEvent() {
18201820
if (LineEnd == StringRef::npos) {
18211821
reportError("expected rest of line");
18221822
Diag << "Found: " << ParsingBuf << "\n";
1823-
return NoneType();
1823+
return None;
18241824
}
18251825
StringRef Line = ParsingBuf.substr(0, LineEnd);
18261826

18271827
size_t Pos = Line.find("PERF_RECORD_COMM exec");
18281828
if (Pos == StringRef::npos)
1829-
return NoneType();
1829+
return None;
18301830
Line = Line.drop_front(Pos);
18311831

18321832
// Line:
@@ -1836,7 +1836,7 @@ Optional<int32_t> DataAggregator::parseCommExecEvent() {
18361836
if (PIDStr.getAsInteger(10, PID)) {
18371837
reportError("expected PID");
18381838
Diag << "Found: " << PIDStr << "in '" << Line << "'\n";
1839-
return NoneType();
1839+
return None;
18401840
}
18411841

18421842
return PID;
@@ -1850,7 +1850,7 @@ Optional<uint64_t> parsePerfTime(const StringRef TimeStr) {
18501850
uint64_t USecTime;
18511851
if (SecTimeStr.getAsInteger(10, SecTime) ||
18521852
USecTimeStr.getAsInteger(10, USecTime))
1853-
return NoneType();
1853+
return None;
18541854
return SecTime * 1000000ULL + USecTime;
18551855
}
18561856
}
@@ -1863,14 +1863,14 @@ Optional<DataAggregator::ForkInfo> DataAggregator::parseForkEvent() {
18631863
if (LineEnd == StringRef::npos) {
18641864
reportError("expected rest of line");
18651865
Diag << "Found: " << ParsingBuf << "\n";
1866-
return NoneType();
1866+
return None;
18671867
}
18681868
StringRef Line = ParsingBuf.substr(0, LineEnd);
18691869

18701870
size_t Pos = Line.find("PERF_RECORD_FORK");
18711871
if (Pos == StringRef::npos) {
18721872
consumeRestOfLine();
1873-
return NoneType();
1873+
return None;
18741874
}
18751875

18761876
ForkInfo FI;
@@ -1889,14 +1889,14 @@ Optional<DataAggregator::ForkInfo> DataAggregator::parseForkEvent() {
18891889
if (ChildPIDStr.getAsInteger(10, FI.ChildPID)) {
18901890
reportError("expected PID");
18911891
Diag << "Found: " << ChildPIDStr << "in '" << Line << "'\n";
1892-
return NoneType();
1892+
return None;
18931893
}
18941894

18951895
const StringRef ParentPIDStr = Line.rsplit('(').second.split(':').first;
18961896
if (ParentPIDStr.getAsInteger(10, FI.ParentPID)) {
18971897
reportError("expected PID");
18981898
Diag << "Found: " << ParentPIDStr << "in '" << Line << "'\n";
1899-
return NoneType();
1899+
return None;
19001900
}
19011901

19021902
consumeRestOfLine();
@@ -2147,17 +2147,17 @@ DataAggregator::parseNameBuildIDPair() {
21472147

21482148
ErrorOr<StringRef> BuildIDStr = parseString(FieldSeparator, true);
21492149
if (std::error_code EC = BuildIDStr.getError())
2150-
return NoneType();
2150+
return None;
21512151

21522152
// If one of the strings is missing, don't issue a parsing error, but still
21532153
// do not return a value.
21542154
consumeAllRemainingFS();
21552155
if (checkNewLine())
2156-
return NoneType();
2156+
return None;
21572157

21582158
ErrorOr<StringRef> NameStr = parseString(FieldSeparator, true);
21592159
if (std::error_code EC = NameStr.getError())
2160-
return NoneType();
2160+
return None;
21612161

21622162
consumeRestOfLine();
21632163
return std::make_pair(NameStr.get(), BuildIDStr.get());
@@ -2205,7 +2205,7 @@ DataAggregator::getFileNameForBuildID(StringRef FileBuildID) {
22052205
if (!FileName.empty())
22062206
return FileName;
22072207

2208-
return NoneType();
2208+
return None;
22092209
}
22102210

22112211
std::error_code

bolt/lib/Profile/DataReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Optional<StringRef> getLTOCommonName(const StringRef Name) {
4949
return Name.substr(0, LTOSuffixPos + 11);
5050
if ((LTOSuffixPos = Name.find(".llvm.")) != StringRef::npos)
5151
return Name.substr(0, LTOSuffixPos + 6);
52-
return NoneType();
52+
return None;
5353
}
5454

5555
namespace {

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ void RewriteInstance::parseBuildID() {
681681

682682
Optional<std::string> RewriteInstance::getPrintableBuildID() const {
683683
if (BuildID.empty())
684-
return NoneType();
684+
return None;
685685

686686
std::string Str;
687687
raw_string_ostream OS(Str);
@@ -4763,7 +4763,7 @@ void RewriteInstance::updateELFSymbolTable(
47634763
assert(SymbolName && "cannot get symbol name");
47644764

47654765
auto updateSymbolValue = [&](const StringRef Name,
4766-
Optional<uint64_t> Value = NoneType()) {
4766+
Optional<uint64_t> Value = None) {
47674767
NewSymbol.st_value = Value ? *Value : getNewValueForSymbol(Name);
47684768
NewSymbol.st_shndx = ELF::SHN_ABS;
47694769
outs() << "BOLT-INFO: setting " << Name << " to 0x"

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,7 +2600,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
26002600
if (FKI.Flags & MCFixupKindInfo::FKF_IsPCRel) {
26012601
switch (FKI.TargetSize) {
26022602
default:
2603-
return NoneType();
2603+
return None;
26042604
case 8: RelType = ELF::R_X86_64_PC8; break;
26052605
case 16: RelType = ELF::R_X86_64_PC16; break;
26062606
case 32: RelType = ELF::R_X86_64_PC32; break;
@@ -2609,7 +2609,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
26092609
} else {
26102610
switch (FKI.TargetSize) {
26112611
default:
2612-
return NoneType();
2612+
return None;
26132613
case 8: RelType = ELF::R_X86_64_8; break;
26142614
case 16: RelType = ELF::R_X86_64_16; break;
26152615
case 32: RelType = ELF::R_X86_64_32; break;

0 commit comments

Comments
 (0)