[PATCH] D125038: [Instrumentation] Share InstrumentationIRBuilder between TSan and SanCov
Marco Elver via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 14:08:20 PDT 2022
melver added inline comments.
================
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)
----------------
nickdesaulniers wrote:
> Do we construct any IRBuilders with more than 1 arg?
>
> Do we still need `explicit` if there's more than 1 arg?
Yeah, I wanted to try this on AddressSanitizer.cpp, where there are some. It's not used right now, but for completeness I felt I should add it. If you think we should only add the support when it's actually used, I can remove.
WDYT?
Yes, the explicit should stay for vararg constructors where there can only be 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