From 11a963bdbb6286d1ee7e847d7903cc6de1e647b3 Mon Sep 17 00:00:00 2001 From: Matt Seaman Date: Sun, 14 Feb 2021 02:05:12 -0500 Subject: [PATCH] Remove LLVMAddInternalizePassWithMustPreservePredicate from shims This is already provided by llvm-c in IPO.h per https://reviews.llvm.org/D62456 --- Sources/llvmshims/include/shim.h | 4 ---- Sources/llvmshims/src/shim.cpp | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/Sources/llvmshims/include/shim.h b/Sources/llvmshims/include/shim.h index 4c60936b..30b5648e 100644 --- a/Sources/llvmshims/include/shim.h +++ b/Sources/llvmshims/include/shim.h @@ -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, diff --git a/Sources/llvmshims/src/shim.cpp b/Sources/llvmshims/src/shim.cpp index 574e9bb5..766d7b7e 100644 --- a/Sources/llvmshims/src/shim.cpp +++ b/Sources/llvmshims/src/shim.cpp @@ -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, @@ -85,14 +80,6 @@ uint64_t LLVMGlobalGetGUID(LLVMValueRef Glob) { return unwrap(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()); }