Use unique_ptr to manage the lifetime of ABIInfo member inside TargetCodeGenInfo.
Details
Details
Diff Detail
Diff Detail
Event Timeline
| clang/lib/CodeGen/TargetInfo.h | ||
|---|---|---|
| 51 | I'm not sure removing a virtual destructor is a good idea. The use of delete in relation to TargetCodeGenInfo (and derived class) pointers would need to be checked. | |
Comment Actions
Funny that it's the front-end code that this patch makes more C++11 after so many years. LGTM; thanks.
clang-format: please reformat the code
- TargetCodeGenInfo(std::unique_ptr<ABIInfo> Info) - : Info(std::move(Info)) {} + TargetCodeGenInfo(std::unique_ptr<ABIInfo> Info) : Info(std::move(Info)) {}