diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp b/contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp index 153fe77b8b4a..38f658084294 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/ShadowStackGCLowering.cpp @@ -106,7 +106,7 @@ ShadowStackGCLowering::ShadowStackGCLowering() : FunctionPass(ID) { Constant *ShadowStackGCLowering::GetFrameMap(Function &F) { // doInitialization creates the abstract type of this value. - Type *VoidPtr = Type::getInt8PtrTy(F.getContext()); + Type *VoidPtr = PointerType::getUnqual(F.getContext()); // Truncate the ShadowStackDescriptor if some metadata is null. unsigned NumMeta = 0; @@ -326,7 +326,7 @@ bool ShadowStackGCLowering::runOnFunction(Function &F) { // Initialize the map pointer and load the current head of the shadow stack. Instruction *CurrentHead = - AtEntry.CreateLoad(StackEntryTy->getPointerTo(), Head, "gc_currhead"); + AtEntry.CreateLoad(AtEntry.getPtrTy(), Head, "gc_currhead"); Instruction *EntryMapPtr = CreateGEP(Context, AtEntry, ConcreteStackEntryTy, StackEntry, 0, 1, "gc_frame.map"); AtEntry.CreateStore(FrameMap, EntryMapPtr); @@ -368,8 +368,8 @@ bool ShadowStackGCLowering::runOnFunction(Function &F) { Instruction *EntryNextPtr2 = CreateGEP(Context, *AtExit, ConcreteStackEntryTy, StackEntry, 0, 0, "gc_frame.next"); - Value *SavedHead = AtExit->CreateLoad(StackEntryTy->getPointerTo(), - EntryNextPtr2, "gc_savedhead"); + Value *SavedHead = + AtExit->CreateLoad(AtExit->getPtrTy(), EntryNextPtr2, "gc_savedhead"); AtExit->CreateStore(SavedHead, Head); } |
