summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 334c41f3abc..a70bf27ed7b 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud