X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FInstrumentation%2FInstrProfiling.cpp;h=a70bf27ed7b91dcc22dc90a087536717f5a77289;hp=334c41f3abc2287e59b3218c04e38cac0c24894a;hb=9b627286bc1350e25f0ecdd8a76955e54d333ff6;hpb=a2197f8f51c97ef61a814a7f16fd1eab20a47b5a diff --git a/lib/Transforms/Instrumentation/InstrProfiling.cpp b/lib/Transforms/Instrumentation/InstrProfiling.cpp index 334c41f3abc..a70bf27ed7b 100644 --- a/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -173,13 +173,14 @@ bool InstrProfiling::runOnModule(Module &M) { } static Constant *getOrInsertValueProfilingCall(Module &M) { - auto *VoidTy = Type::getVoidTy(M.getContext()); - auto *VoidPtrTy = Type::getInt8PtrTy(M.getContext()); - auto *Int32Ty = Type::getInt32Ty(M.getContext()); - auto *Int64Ty = Type::getInt64Ty(M.getContext()); - Type *ArgTypes[] = {Int64Ty, VoidPtrTy, Int32Ty}; + LLVMContext &Ctx = M.getContext(); + auto *ReturnTy = Type::getVoidTy(M.getContext()); + Type *ParamTypes[] = { +#define VALUE_PROF_FUNC_PARAM(ParamType, ParamName, ParamLLVMType) ParamLLVMType +#include "llvm/ProfileData/InstrProfData.inc" + }; auto *ValueProfilingCallTy = - FunctionType::get(VoidTy, makeArrayRef(ArgTypes), false); + FunctionType::get(ReturnTy, makeArrayRef(ParamTypes), false); return M.getOrInsertFunction("__llvm_profile_instrument_target", ValueProfilingCallTy); }