Skip to content

Commit 878d4f7

Browse files
committed
[clang] Remove CodeGen:: ptrauth helpers.
I couldn't find users after all, including in lldb.
1 parent 99ccc72 commit 878d4f7

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

clang/include/clang/CodeGen/CodeGenABITypes.h

-21
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,6 @@ llvm::Type *convertTypeForMemory(CodeGenModule &CGM, QualType T);
106106
unsigned getLLVMFieldNumber(CodeGenModule &CGM,
107107
const RecordDecl *RD, const FieldDecl *FD);
108108

109-
/// Compute a stable hash of the given string.
110-
///
111-
/// The exact algorithm is the little-endian interpretation of the
112-
/// non-doubled (i.e. 64-bit) result of applying a SipHash-2-4 using
113-
/// a specific key value which can be found in the source.
114-
uint64_t computeStableStringHash(StringRef string);
115-
116-
/// Return a declaration discriminator for the given global decl.
117-
uint16_t getPointerAuthDeclDiscriminator(CodeGenModule &CGM, GlobalDecl GD);
118-
119-
/// Return a type discriminator for the given function type.
120-
uint16_t getPointerAuthTypeDiscriminator(CodeGenModule &CGM,
121-
QualType FunctionType);
122-
123-
/// Return a signed constant pointer.
124-
llvm::Constant *getConstantSignedPointer(CodeGenModule &CGM,
125-
llvm::Constant *pointer,
126-
unsigned key,
127-
llvm::Constant *storageAddress,
128-
llvm::ConstantInt *otherDiscriminator);
129-
130109
/// Given the language and code-generation options that Clang was configured
131110
/// with, set the default LLVM IR attributes for a function definition.
132111
/// The attributes set here are mostly global target-configuration and

clang/lib/CodeGen/CGPointerAuth.cpp

-24
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,6 @@ CodeGenModule::getPointerAuthOtherDiscriminator(const PointerAuthSchema &Schema,
5555
llvm_unreachable("bad discrimination kind");
5656
}
5757

58-
uint16_t CodeGen::getPointerAuthTypeDiscriminator(CodeGenModule &CGM,
59-
QualType FunctionType) {
60-
return CGM.getContext().getPointerAuthTypeDiscriminator(FunctionType);
61-
}
62-
63-
/// Compute an ABI-stable hash of the given string.
64-
uint64_t CodeGen::computeStableStringHash(StringRef string) {
65-
return clang::getStableStringHash(string);
66-
}
67-
68-
uint16_t CodeGen::getPointerAuthDeclDiscriminator(CodeGenModule &CGM,
69-
GlobalDecl Declaration) {
70-
return CGM.getPointerAuthDeclDiscriminator(Declaration);
71-
}
72-
7358
CGPointerAuthInfo CodeGenModule::EmitPointerAuthInfo(const RecordDecl *RD) {
7459
assert(RD && "null RecordDecl passed");
7560
auto *Attr = RD->getAttr<PointerAuthStructAttr>();
@@ -702,15 +687,6 @@ llvm::Constant *CodeGenModule::getConstantSignedPointer(
702687
OtherDiscriminator);
703688
}
704689

705-
llvm::Constant *
706-
CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
707-
llvm::Constant *pointer, unsigned key,
708-
llvm::Constant *storageAddress,
709-
llvm::ConstantInt *otherDiscriminator) {
710-
return CGM.getConstantSignedPointer(pointer, key, storageAddress,
711-
otherDiscriminator);
712-
}
713-
714690
void CodeGenModule::destroyConstantSignedPointerCaches() {
715691
destroyCache<ByConstantCacheTy>(ConstantSignedPointersByConstant);
716692
destroyCache<ByDeclCacheTy>(ConstantSignedPointersByDecl);

0 commit comments

Comments
 (0)