File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -31,17 +31,17 @@ class SyclOptReportHandler {
31
31
32
32
OptReportInfo (std::string ArgName, std::string ArgType,
33
33
SourceLocation ArgLoc)
34
- : KernelArgName(ArgName), KernelArgType(ArgType), KernelArgLoc(ArgLoc) {
35
- }
34
+ : KernelArgName(std::move( ArgName)) , KernelArgType(std::move( ArgType)),
35
+ KernelArgLoc (ArgLoc) { }
36
36
};
37
- llvm::DenseMap<const FunctionDecl *, SmallVector<OptReportInfo, 4 >> Map;
37
+ llvm::DenseMap<const FunctionDecl *, SmallVector<OptReportInfo>> Map;
38
38
39
39
public:
40
40
void AddKernelArgs (const FunctionDecl *FD, std::string ArgName,
41
41
std::string ArgType, SourceLocation ArgLoc) {
42
42
Map[FD].emplace_back (ArgName, ArgType, ArgLoc);
43
43
}
44
- SmallVector<OptReportInfo, 4 > &GetInfo (const FunctionDecl *FD) {
44
+ SmallVector<OptReportInfo> &GetInfo (const FunctionDecl *FD) {
45
45
auto It = Map.find (FD);
46
46
assert (It != Map.end ());
47
47
return It->second ;
Original file line number Diff line number Diff line change @@ -1038,12 +1038,11 @@ struct OptRecordFileRAII {
1038
1038
1039
1039
OptRecordFileRAII (CodeGenAction &CGA, llvm::LLVMContext &Ctx,
1040
1040
BackendConsumer &BC)
1041
- : Ctx(Ctx) {
1041
+ : Ctx(Ctx), OldDiagnosticHandler(Ctx.getDiagnosticHandler()) {
1042
+
1042
1043
CompilerInstance &CI = CGA.getCompilerInstance ();
1043
1044
CodeGenOptions &CodeGenOpts = CI.getCodeGenOpts ();
1044
1045
1045
- OldDiagnosticHandler = Ctx.getDiagnosticHandler ();
1046
-
1047
1046
Ctx.setDiagnosticHandler (
1048
1047
std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &BC));
1049
1048
You can’t perform that action at this time.
0 commit comments