[PATCH] Implement `createSanitizerCtor`, common helper function for all sanitizers
Alexey Samsonov
vonosmas at gmail.com
Tue May 5 14:06:29 PDT 2015
================
Comment at: include/llvm/Transforms/Utils/ModuleUtils.h:59
@@ -46,1 +58,3 @@
+ Module &M, StringRef CtorName, StringRef InitName,
+ ArrayRef<Type *> InitType, ArrayRef<Value *> InitArgs);
} // End llvm namespace
----------------
ismailp wrote:
> samsonov wrote:
> > This is not really `InitType`, this is `InitArgTypes`, right?
> Yes, this is `InitArgsType`.
Please rename accordingly.
================
Comment at: lib/Transforms/Utils/ModuleUtils.cpp:112
@@ +111,3 @@
+ assert(!InitName.empty() && "Expected init function name");
+ Function *Ctor = Function::Create(
+ FunctionType::get(Type::getVoidTy(M.getContext()), false),
----------------
ismailp wrote:
> samsonov wrote:
> > assert that two ArrayRef's have equal size?
> Yes, I will add assertion. But, IIRC, it is already done by `CreateCall` below. I have a vague recollection of such an assertion.
OK, feel free to disregard this.
http://reviews.llvm.org/D8777
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list