LLVM: lib/Remarks/RemarkStreamer.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
15#include
16#include
17
18using namespace llvm;
20
22 "remarks-section",
24 "Emit a section containing remark diagnostics metadata. By default, "
25 "this is enabled for the following formats: bitstream."),
27
29 std::unique_ptrremarks::RemarkSerializer RemarkSerializer,
30 std::optional FilenameIn)
31 : RemarkSerializer(std::move(RemarkSerializer)),
32 Filename(FilenameIn ? std::optional<std::string>(FilenameIn->str())
33 : std::nullopt) {}
34
36
37
38 assert(!RemarkSerializer &&
39 "RemarkSerializer must be released before RemarkStreamer is "
40 "destroyed. Ensure llvm::finalizeOptimizationRemarks is called.");
41}
42
45 std::string RegexError;
46 if (!R.isValid(RegexError))
47 return createStringError(std::make_error_code(std::errc::invalid_argument),
48 RegexError.data());
49 PassFilter = std::move(R);
51}
52
54 if (PassFilter)
55 return PassFilter->match(Str);
56
57 return true;
58}
59
62 return true;
63
65 return false;
66
68
69
70
72}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
StringRef - Represent a constant reference to a string, i.e.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.