1*81ad6265SDimitry Andric //===-- DXILWriterPass.h - Bitcode writing pass --------------*- C++ -*-===// 2*81ad6265SDimitry Andric // 3*81ad6265SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*81ad6265SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*81ad6265SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*81ad6265SDimitry Andric // 7*81ad6265SDimitry Andric //===----------------------------------------------------------------------===// 8*81ad6265SDimitry Andric /// \file 9*81ad6265SDimitry Andric /// 10*81ad6265SDimitry Andric /// This file provides a bitcode writing pass. 11*81ad6265SDimitry Andric /// 12*81ad6265SDimitry Andric //===----------------------------------------------------------------------===// 13*81ad6265SDimitry Andric 14*81ad6265SDimitry Andric #ifndef LLVM_BITCODE_DXILWriterPass_H 15*81ad6265SDimitry Andric #define LLVM_BITCODE_DXILWriterPass_H 16*81ad6265SDimitry Andric 17*81ad6265SDimitry Andric #include "DirectX.h" 18*81ad6265SDimitry Andric #include "llvm/Bitcode/BitcodeWriter.h" 19*81ad6265SDimitry Andric #include "llvm/IR/PassManager.h" 20*81ad6265SDimitry Andric 21*81ad6265SDimitry Andric namespace llvm { 22*81ad6265SDimitry Andric class Module; 23*81ad6265SDimitry Andric class raw_ostream; 24*81ad6265SDimitry Andric 25*81ad6265SDimitry Andric /// Create and return a pass that writes the module to the specified 26*81ad6265SDimitry Andric /// ostream. Note that this pass is designed for use with the legacy pass 27*81ad6265SDimitry Andric /// manager. 28*81ad6265SDimitry Andric ModulePass *createDXILWriterPass(raw_ostream &Str); 29*81ad6265SDimitry Andric 30*81ad6265SDimitry Andric /// Create and return a pass that writes the module to a global variable in the 31*81ad6265SDimitry Andric /// module for later emission in the MCStreamer. Note that this pass is designed 32*81ad6265SDimitry Andric /// for use with the legacy pass manager because it is run in CodeGen only. 33*81ad6265SDimitry Andric ModulePass *createDXILEmbedderPass(); 34*81ad6265SDimitry Andric 35*81ad6265SDimitry Andric } // namespace llvm 36*81ad6265SDimitry Andric 37*81ad6265SDimitry Andric #endif 38