Skip to content

Remove LLVMAddInternalizePassWithMustPreservePredicate from shims #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Sources/llvmshims/include/shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ uint64_t LLVMGlobalGetGUID(LLVMValueRef Global);

void LLVMAddGlobalsAAWrapperPass(LLVMPassManagerRef PM);

void LLVMAddInternalizePassWithMustPreservePredicate(
LLVMPassManagerRef PM, void *Context,
LLVMBool (*MustPreserve)(LLVMValueRef, void *));

typedef enum {
LLVMTailCallKindNone,
LLVMTailCallKindTail,
Expand Down
13 changes: 0 additions & 13 deletions Sources/llvmshims/src/shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ extern "C" {
// https://reviews.llvm.org/D66237
void LLVMAddGlobalsAAWrapperPass(LLVMPassManagerRef PM);

// https://reviews.llvm.org/D62456
void LLVMAddInternalizePassWithMustPreservePredicate(
LLVMPassManagerRef PM, void *Context,
LLVMBool (*MustPreserve)(LLVMValueRef, void *));

// https://reviews.llvm.org/D66061
typedef enum {
LLVMTailCallKindNone,
Expand Down Expand Up @@ -85,14 +80,6 @@ uint64_t LLVMGlobalGetGUID(LLVMValueRef Glob) {
return unwrap<GlobalValue>(Glob)->getGUID();
}

void LLVMAddInternalizePassWithMustPreservePredicate(
LLVMPassManagerRef PM, void *Context,
LLVMBool (*Pred)(LLVMValueRef, void *)) {
unwrap(PM)->add(createInternalizePass([=](const GlobalValue &GV) {
return Pred(wrap(&GV), Context) == 0 ? false : true;
}));
}

void LLVMAddGlobalsAAWrapperPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createGlobalsAAWrapperPass());
}
Expand Down