@@ -140,7 +140,7 @@ CodeGenModule::getConstantSignedPointer(llvm::Constant *Pointer, unsigned Key,
140140}
141141
142142// / Does a given PointerAuthScheme require us to sign a value
143- static bool shouldSignPointer (const PointerAuthSchema &Schema) {
143+ bool CodeGenModule:: shouldSignPointer (const PointerAuthSchema &Schema) {
144144 auto AuthenticationMode = Schema.getAuthenticationMode ();
145145 return AuthenticationMode == PointerAuthenticationMode::SignAndStrip ||
146146 AuthenticationMode == PointerAuthenticationMode::SignAndAuth;
@@ -160,35 +160,6 @@ llvm::Constant *CodeGenModule::getConstantSignedPointer(
160160 OtherDiscriminator);
161161}
162162
163- // / Sign the given pointer and add it to the constant initializer
164- // / currently being built.
165- void ConstantAggregateBuilderBase::addSignedPointer (
166- llvm::Constant *Pointer, const PointerAuthSchema &Schema,
167- GlobalDecl CalleeDecl, QualType CalleeType) {
168- if (!Schema || !shouldSignPointer (Schema))
169- return add (Pointer);
170-
171- llvm::Constant *StorageAddress = nullptr ;
172- if (Schema.isAddressDiscriminated ())
173- StorageAddress = getAddrOfCurrentPosition (Pointer->getType ());
174-
175- llvm::Constant *SignedPointer = Builder.CGM .getConstantSignedPointer (
176- Pointer, Schema, StorageAddress, CalleeDecl, CalleeType);
177- add (SignedPointer);
178- }
179-
180- void ConstantAggregateBuilderBase::addSignedPointer (
181- llvm::Constant *Pointer, unsigned Key, bool UseAddressDiscrimination,
182- llvm::ConstantInt *OtherDiscriminator) {
183- llvm::Constant *StorageAddress = nullptr ;
184- if (UseAddressDiscrimination)
185- StorageAddress = getAddrOfCurrentPosition (Pointer->getType ());
186-
187- llvm::Constant *SignedPointer = Builder.CGM .getConstantSignedPointer (
188- Pointer, Key, StorageAddress, OtherDiscriminator);
189- add (SignedPointer);
190- }
191-
192163// / If applicable, sign a given constant function pointer with the ABI rules for
193164// / functionType.
194165llvm::Constant *CodeGenModule::getFunctionPointer (llvm::Constant *Pointer,
0 commit comments