[PATCH] D125038: [Instrumentation] Share InstrumentationIRBuilder between TSan and SanCov
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 13:27:19 PDT 2022
nickdesaulniers accepted this revision.
nickdesaulniers added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/include/llvm/Transforms/Instrumentation.h:18-24
+#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/IRBuilder.h"
#include <cassert>
#include <cstdint>
#include <limits>
#include <string>
+#include <utility>
----------------
If we're going to update the includes, please consider also including Function.h and Instruction.h.
================
Comment at: llvm/include/llvm/Transforms/Instrumentation.h:202-211
+ explicit InstrumentationIRBuilder(BasicBlock *TheBB, Args &&...args)
+ : IRBuilder<>(TheBB, std::forward<Args>(args)...) {
+ ensureDebugInfo(*this, *TheBB->getParent());
+ }
+
+ template <typename... Args>
+ explicit InstrumentationIRBuilder(Instruction *IP, Args &&...args)
----------------
Do we construct any IRBuilders with more than 1 arg?
Do we still need `explicit` if there's more than 1 arg?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125038/new/
https://reviews.llvm.org/D125038
More information about the llvm-commits
mailing list