Skip to content

Commit 6a87209

Browse files
committed
Review comments fixes
Signed-off-by: Zahira Ammarguellat <[email protected]>
1 parent 0937042 commit 6a87209

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

clang/include/clang/Basic/SyclOptReportHandler.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ class SyclOptReportHandler {
3131

3232
OptReportInfo(std::string ArgName, std::string ArgType,
3333
SourceLocation ArgLoc)
34-
: KernelArgName(ArgName), KernelArgType(ArgType), KernelArgLoc(ArgLoc) {
35-
}
34+
: KernelArgName(std::move(ArgName)), KernelArgType(std::move(ArgType)),
35+
KernelArgLoc(ArgLoc) {}
3636
};
37-
llvm::DenseMap<const FunctionDecl *, SmallVector<OptReportInfo, 4>> Map;
37+
llvm::DenseMap<const FunctionDecl *, SmallVector<OptReportInfo>> Map;
3838

3939
public:
4040
void AddKernelArgs(const FunctionDecl *FD, std::string ArgName,
4141
std::string ArgType, SourceLocation ArgLoc) {
4242
Map[FD].emplace_back(ArgName, ArgType, ArgLoc);
4343
}
44-
SmallVector<OptReportInfo, 4> &GetInfo(const FunctionDecl *FD) {
44+
SmallVector<OptReportInfo> &GetInfo(const FunctionDecl *FD) {
4545
auto It = Map.find(FD);
4646
assert(It != Map.end());
4747
return It->second;

clang/lib/CodeGen/CodeGenAction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,12 +1038,11 @@ struct OptRecordFileRAII {
10381038

10391039
OptRecordFileRAII(CodeGenAction &CGA, llvm::LLVMContext &Ctx,
10401040
BackendConsumer &BC)
1041-
: Ctx(Ctx) {
1041+
: Ctx(Ctx), OldDiagnosticHandler(Ctx.getDiagnosticHandler()) {
1042+
10421043
CompilerInstance &CI = CGA.getCompilerInstance();
10431044
CodeGenOptions &CodeGenOpts = CI.getCodeGenOpts();
10441045

1045-
OldDiagnosticHandler = Ctx.getDiagnosticHandler();
1046-
10471046
Ctx.setDiagnosticHandler(
10481047
std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &BC));
10491048

0 commit comments

Comments
 (0)