@@ -943,7 +943,7 @@ DataAggregator::getFallthroughsInTrace(BinaryFunction &BF,
943
943
SmallVector<std::pair<uint64_t , uint64_t >, 16 > Res;
944
944
945
945
if (!recordTrace (BF, FirstLBR, SecondLBR, Count, &Res))
946
- return NoneType () ;
946
+ return None ;
947
947
948
948
return Res;
949
949
}
@@ -1820,13 +1820,13 @@ Optional<int32_t> DataAggregator::parseCommExecEvent() {
1820
1820
if (LineEnd == StringRef::npos) {
1821
1821
reportError (" expected rest of line" );
1822
1822
Diag << " Found: " << ParsingBuf << " \n " ;
1823
- return NoneType () ;
1823
+ return None ;
1824
1824
}
1825
1825
StringRef Line = ParsingBuf.substr (0 , LineEnd);
1826
1826
1827
1827
size_t Pos = Line.find (" PERF_RECORD_COMM exec" );
1828
1828
if (Pos == StringRef::npos)
1829
- return NoneType () ;
1829
+ return None ;
1830
1830
Line = Line.drop_front (Pos);
1831
1831
1832
1832
// Line:
@@ -1836,7 +1836,7 @@ Optional<int32_t> DataAggregator::parseCommExecEvent() {
1836
1836
if (PIDStr.getAsInteger (10 , PID)) {
1837
1837
reportError (" expected PID" );
1838
1838
Diag << " Found: " << PIDStr << " in '" << Line << " '\n " ;
1839
- return NoneType () ;
1839
+ return None ;
1840
1840
}
1841
1841
1842
1842
return PID;
@@ -1850,7 +1850,7 @@ Optional<uint64_t> parsePerfTime(const StringRef TimeStr) {
1850
1850
uint64_t USecTime;
1851
1851
if (SecTimeStr.getAsInteger (10 , SecTime) ||
1852
1852
USecTimeStr.getAsInteger (10 , USecTime))
1853
- return NoneType () ;
1853
+ return None ;
1854
1854
return SecTime * 1000000ULL + USecTime;
1855
1855
}
1856
1856
}
@@ -1863,14 +1863,14 @@ Optional<DataAggregator::ForkInfo> DataAggregator::parseForkEvent() {
1863
1863
if (LineEnd == StringRef::npos) {
1864
1864
reportError (" expected rest of line" );
1865
1865
Diag << " Found: " << ParsingBuf << " \n " ;
1866
- return NoneType () ;
1866
+ return None ;
1867
1867
}
1868
1868
StringRef Line = ParsingBuf.substr (0 , LineEnd);
1869
1869
1870
1870
size_t Pos = Line.find (" PERF_RECORD_FORK" );
1871
1871
if (Pos == StringRef::npos) {
1872
1872
consumeRestOfLine ();
1873
- return NoneType () ;
1873
+ return None ;
1874
1874
}
1875
1875
1876
1876
ForkInfo FI;
@@ -1889,14 +1889,14 @@ Optional<DataAggregator::ForkInfo> DataAggregator::parseForkEvent() {
1889
1889
if (ChildPIDStr.getAsInteger (10 , FI.ChildPID )) {
1890
1890
reportError (" expected PID" );
1891
1891
Diag << " Found: " << ChildPIDStr << " in '" << Line << " '\n " ;
1892
- return NoneType () ;
1892
+ return None ;
1893
1893
}
1894
1894
1895
1895
const StringRef ParentPIDStr = Line.rsplit (' (' ).second .split (' :' ).first ;
1896
1896
if (ParentPIDStr.getAsInteger (10 , FI.ParentPID )) {
1897
1897
reportError (" expected PID" );
1898
1898
Diag << " Found: " << ParentPIDStr << " in '" << Line << " '\n " ;
1899
- return NoneType () ;
1899
+ return None ;
1900
1900
}
1901
1901
1902
1902
consumeRestOfLine ();
@@ -2147,17 +2147,17 @@ DataAggregator::parseNameBuildIDPair() {
2147
2147
2148
2148
ErrorOr<StringRef> BuildIDStr = parseString (FieldSeparator, true );
2149
2149
if (std::error_code EC = BuildIDStr.getError ())
2150
- return NoneType () ;
2150
+ return None ;
2151
2151
2152
2152
// If one of the strings is missing, don't issue a parsing error, but still
2153
2153
// do not return a value.
2154
2154
consumeAllRemainingFS ();
2155
2155
if (checkNewLine ())
2156
- return NoneType () ;
2156
+ return None ;
2157
2157
2158
2158
ErrorOr<StringRef> NameStr = parseString (FieldSeparator, true );
2159
2159
if (std::error_code EC = NameStr.getError ())
2160
- return NoneType () ;
2160
+ return None ;
2161
2161
2162
2162
consumeRestOfLine ();
2163
2163
return std::make_pair (NameStr.get (), BuildIDStr.get ());
@@ -2205,7 +2205,7 @@ DataAggregator::getFileNameForBuildID(StringRef FileBuildID) {
2205
2205
if (!FileName.empty ())
2206
2206
return FileName;
2207
2207
2208
- return NoneType () ;
2208
+ return None ;
2209
2209
}
2210
2210
2211
2211
std::error_code
0 commit comments