| OLD | NEW |
| 1 //===-- BitcodeWriterPass.h - Bitcode writing pass --------------*- C++ -*-===// | 1 //===-- NaClBitcodeWriterPass.h - Bitcode writing pass ----------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// \file | 9 /// \file |
| 10 /// | 10 /// |
| 11 /// This file provides a bitcode writing pass. | 11 /// This file provides a bitcode writing pass. |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef LLVM_BITCODE_BITCODEWRITERPASS_H | 15 #ifndef LLVM_BITCODE_NACL_BITCODE_WRITER_PASS_H |
| 16 #define LLVM_BITCODE_BITCODEWRITERPASS_H | 16 #define LLVM_BITCODE_NACL_BITCODE_WRITER_PASS_H |
| 17 | 17 |
| 18 #include "llvm/ADT/StringRef.h" | 18 #include "llvm/ADT/StringRef.h" |
| 19 | 19 |
| 20 namespace llvm { | 20 namespace llvm { |
| 21 class Module; | 21 class Module; |
| 22 class ModulePass; | 22 class ModulePass; |
| 23 class raw_ostream; | 23 class raw_ostream; |
| 24 class PreservedAnalyses; | 24 class PreservedAnalyses; |
| 25 | 25 |
| 26 /// \brief Create and return a pass that writes the module to the specified | 26 /// \brief Create and return a pass that writes the module to the specified |
| 27 /// ostream. Note that this pass is designed for use with the legacy pass | 27 /// ostream. Note that this pass is designed for use with the legacy pass |
| 28 /// manager. | 28 /// manager. |
| 29 ModulePass *createBitcodeWriterPass(raw_ostream &Str); | 29 ModulePass *createNaClBitcodeWriterPass(raw_ostream &Str); |
| 30 | 30 |
| 31 /// \brief Pass for writing a module of IR out to a bitcode file. | 31 /// \brief Pass for writing a module of IR out to a bitcode file. |
| 32 /// | 32 /// |
| 33 /// Note that this is intended for use with the new pass manager. To construct | 33 /// Note that this is intended for use with the new pass manager. To construct |
| 34 /// a pass for the legacy pass manager, use the function above. | 34 /// a pass for the legacy pass manager, use the function above. |
| 35 class BitcodeWriterPass { | 35 class NaClBitcodeWriterPass { |
| 36 raw_ostream &OS; | 36 raw_ostream &OS; |
| 37 | 37 |
| 38 public: | 38 public: |
| 39 /// \brief Construct a bitcode writer pass around a particular output stream. | 39 /// \brief Construct a bitcode writer pass around a particular output stream. |
| 40 explicit BitcodeWriterPass(raw_ostream &OS) : OS(OS) {} | 40 explicit NaClBitcodeWriterPass(raw_ostream &OS) : OS(OS) {} |
| 41 | 41 |
| 42 /// \brief Run the bitcode writer pass, and output the module to the selected | 42 /// \brief Run the bitcode writer pass, and output the module to the selected |
| 43 /// output stream. | 43 /// output stream. |
| 44 PreservedAnalyses run(Module *M); | 44 PreservedAnalyses run(Module *M); |
| 45 | 45 |
| 46 static StringRef name() { return "BitcodeWriterPass"; } | 46 static StringRef name() { return "NaClBitcodeWriterPass"; } |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } | 49 } |
| 50 | 50 |
| 51 #endif | 51 #endif |
| OLD | NEW |