Path: blob/main/contrib/llvm-project/llvm/lib/Target/DirectX/DXILFinalizeLinkage.h
213799 views
//===- DXILFinalizeLinkage.h - Finalize linkage of functions --------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// DXILFinalizeLinkage pass updates the linkage of functions to make sure only9/// shader entry points and exported functions are visible from the module (have10/// program linkage). All other functions will be updated to have internal11/// linkage.12///13//===----------------------------------------------------------------------===//1415#ifndef LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H16#define LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H1718#include "llvm/IR/PassManager.h"19#include "llvm/Pass.h"2021namespace llvm {2223class DXILFinalizeLinkage : public PassInfoMixin<DXILFinalizeLinkage> {24public:25PreservedAnalyses run(Module &M, ModuleAnalysisManager &);26static bool isRequired() { return true; }27};2829class DXILFinalizeLinkageLegacy : public ModulePass {30public:31DXILFinalizeLinkageLegacy() : ModulePass(ID) {}32bool runOnModule(Module &M) override;3334static char ID; // Pass identification.35};36} // namespace llvm3738#endif // LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H394041