1292915Sdim//===-- StripDeadPrototypes.h - Remove unused function declarations -------===// 2292915Sdim// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6292915Sdim// 7292915Sdim//===----------------------------------------------------------------------===// 8292915Sdim// 9292915Sdim// This pass loops over all of the functions in the input module, looking for 10292915Sdim// dead declarations and removes them. Dead declarations are declarations of 11292915Sdim// functions for which no implementation is available (i.e., declarations for 12292915Sdim// unused library functions). 13292915Sdim// 14292915Sdim//===----------------------------------------------------------------------===// 15292915Sdim 16292915Sdim#ifndef LLVM_TRANSFORMS_IPO_STRIPDEADPROTOTYPES_H 17292915Sdim#define LLVM_TRANSFORMS_IPO_STRIPDEADPROTOTYPES_H 18292915Sdim 19292915Sdim#include "llvm/IR/Module.h" 20292915Sdim#include "llvm/IR/PassManager.h" 21292915Sdim 22292915Sdimnamespace llvm { 23292915Sdim 24292915Sdim/// Pass to remove unused function declarations. 25309124Sdimstruct StripDeadPrototypesPass : PassInfoMixin<StripDeadPrototypesPass> { 26309124Sdim PreservedAnalyses run(Module &M, ModuleAnalysisManager &); 27292915Sdim}; 28292915Sdim 29292915Sdim} 30292915Sdim 31292915Sdim#endif // LLVM_TRANSFORMS_IPO_STRIPDEADPROTOTYPES_H 32