[PATCH] Implement `createSanitizerCtor`, common helper function for all sanitizers
Alexey Samsonov
vonosmas at gmail.com
Tue May 5 10:59:18 PDT 2015
LGTM with a couple of nits.
================
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
----------------
This is not really `InitType`, this is `InitArgTypes`, right?
================
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),
----------------
assert that two ArrayRef's have equal size?
http://reviews.llvm.org/D8777
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list