Skip to content

Commit 6fe29b9

Browse files
committed
[clang] Remove unused CodeGen:: ptrauth helpers. NFCI.
AFAICT these are also unused. Let's find out!
1 parent d68f8b9 commit 6fe29b9

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

clang/include/clang/CodeGen/CodeGenABITypes.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,6 @@ llvm::Type *convertTypeForMemory(CodeGenModule &CGM, QualType T);
106106
unsigned getLLVMFieldNumber(CodeGenModule &CGM,
107107
const RecordDecl *RD, const FieldDecl *FD);
108108

109-
/// Return a declaration discriminator for the given global decl.
110-
uint16_t getPointerAuthDeclDiscriminator(CodeGenModule &CGM, GlobalDecl GD);
111-
112-
/// Return a type discriminator for the given function type.
113-
uint16_t getPointerAuthTypeDiscriminator(CodeGenModule &CGM,
114-
QualType FunctionType);
115-
116-
/// Return a signed constant pointer.
117-
llvm::Constant *getConstantSignedPointer(CodeGenModule &CGM,
118-
llvm::Constant *pointer,
119-
unsigned key,
120-
llvm::Constant *storageAddress,
121-
llvm::ConstantInt *otherDiscriminator);
122-
123109
/// Given the language and code-generation options that Clang was configured
124110
/// with, set the default LLVM IR attributes for a function definition.
125111
/// The attributes set here are mostly global target-configuration and

clang/lib/CodeGen/CGPointerAuth.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@ llvm::ConstantInt *CodeGenModule::getPointerAuthOtherDiscriminator(
5252
llvm_unreachable("bad discrimination kind");
5353
}
5454

55-
uint16_t CodeGen::getPointerAuthTypeDiscriminator(CodeGenModule &CGM,
56-
QualType FunctionType) {
57-
return CGM.getContext().getPointerAuthTypeDiscriminator(FunctionType);
58-
}
59-
60-
uint16_t CodeGen::getPointerAuthDeclDiscriminator(CodeGenModule &CGM,
61-
GlobalDecl Declaration) {
62-
return CGM.getPointerAuthDeclDiscriminator(Declaration);
63-
}
64-
6555
/// Return the "other" decl-specific discriminator for the given decl.
6656
uint16_t
6757
CodeGenModule::getPointerAuthDeclDiscriminator(GlobalDecl Declaration) {
@@ -615,15 +605,6 @@ llvm::Constant *CodeGenModule::getConstantSignedPointer(
615605
OtherDiscriminator);
616606
}
617607

618-
llvm::Constant *
619-
CodeGen::getConstantSignedPointer(CodeGenModule &CGM,
620-
llvm::Constant *pointer, unsigned key,
621-
llvm::Constant *storageAddress,
622-
llvm::ConstantInt *otherDiscriminator) {
623-
return CGM.getConstantSignedPointer(pointer, key, storageAddress,
624-
otherDiscriminator);
625-
}
626-
627608
void CodeGenModule::destroyConstantSignedPointerCaches() {
628609
destroyCache<ByConstantCacheTy>(ConstantSignedPointersByConstant);
629610
destroyCache<ByDeclCacheTy>(ConstantSignedPointersByDecl);

0 commit comments

Comments
 (0)