diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:03 +0000 |
| commit | c9157d925c489f07ba9c0b2ce47e5149b75969a5 (patch) | |
| tree | 08bc4a3d9cad3f9ebffa558ddf140b9d9257b219 /contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | |
| parent | 2a66844f606a35d68ad8a8061f4bea204274b3bc (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp index d424ebbef99d..092f1799755d 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp @@ -35,7 +35,7 @@ static void insertCall(Function &CurFn, StringRef Func, Triple TargetTriple(M.getTargetTriple()); if (TargetTriple.isOSAIX() && Func == "__mcount") { Type *SizeTy = M.getDataLayout().getIntPtrType(C); - Type *SizePtrTy = SizeTy->getPointerTo(); + Type *SizePtrTy = PointerType::getUnqual(C); GlobalVariable *GV = new GlobalVariable(M, SizeTy, /*isConstant=*/false, GlobalValue::InternalLinkage, ConstantInt::get(SizeTy, 0)); @@ -54,7 +54,7 @@ static void insertCall(Function &CurFn, StringRef Func, } if (Func == "__cyg_profile_func_enter" || Func == "__cyg_profile_func_exit") { - Type *ArgTypes[] = {Type::getInt8PtrTy(C), Type::getInt8PtrTy(C)}; + Type *ArgTypes[] = {PointerType::getUnqual(C), PointerType::getUnqual(C)}; FunctionCallee Fn = M.getOrInsertFunction( Func, FunctionType::get(Type::getVoidTy(C), ArgTypes, false)); @@ -65,9 +65,7 @@ static void insertCall(Function &CurFn, StringRef Func, InsertionPt); RetAddr->setDebugLoc(DL); - Value *Args[] = {ConstantExpr::getBitCast(&CurFn, Type::getInt8PtrTy(C)), - RetAddr}; - + Value *Args[] = {&CurFn, RetAddr}; CallInst *Call = CallInst::Create(Fn, ArrayRef<Value *>(Args), "", InsertionPt); Call->setDebugLoc(DL); |
