comparison clang/lib/CodeGen/CGBuilder.h @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children 2e18cbf3894f
comparison
equal deleted inserted replaced
172:9fbae9c8bf63 173:0572611fdcc8
20 class CodeGenFunction; 20 class CodeGenFunction;
21 21
22 /// This is an IRBuilder insertion helper that forwards to 22 /// This is an IRBuilder insertion helper that forwards to
23 /// CodeGenFunction::InsertHelper, which adds necessary metadata to 23 /// CodeGenFunction::InsertHelper, which adds necessary metadata to
24 /// instructions. 24 /// instructions.
25 class CGBuilderInserter : protected llvm::IRBuilderDefaultInserter { 25 class CGBuilderInserter final : public llvm::IRBuilderDefaultInserter {
26 public: 26 public:
27 CGBuilderInserter() = default; 27 CGBuilderInserter() = default;
28 explicit CGBuilderInserter(CodeGenFunction *CGF) : CGF(CGF) {} 28 explicit CGBuilderInserter(CodeGenFunction *CGF) : CGF(CGF) {}
29 29
30 protected:
31 /// This forwards to CodeGenFunction::InsertHelper. 30 /// This forwards to CodeGenFunction::InsertHelper.
32 void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name, 31 void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name,
33 llvm::BasicBlock *BB, 32 llvm::BasicBlock *BB,
34 llvm::BasicBlock::iterator InsertPt) const; 33 llvm::BasicBlock::iterator InsertPt) const override;
35 private: 34 private:
36 CodeGenFunction *CGF = nullptr; 35 CodeGenFunction *CGF = nullptr;
37 }; 36 };
38 37
39 typedef CGBuilderInserter CGBuilderInserterTy; 38 typedef CGBuilderInserter CGBuilderInserterTy;