OLD | NEW |
---|---|
1 //===---- llvm/Support/IRReader.h - Reader for LLVM IR files ----*- C++ -*-===// | 1 //===---- llvm/Support/IRReader.h - Reader for LLVM IR files ----*- 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 // | 9 // |
10 // This file defines functions for reading LLVM IR. They support both | 10 // This file defines functions for reading LLVM IR. They support both |
11 // Bitcode and Assembly, automatically detecting the input format. | 11 // Bitcode and Assembly, automatically detecting the input format. |
12 // | 12 // |
13 // These functions must be defined in a header file in order to avoid | 13 // These functions must be defined in a header file in order to avoid |
14 // library dependencies, since they reference both Bitcode and Assembly | 14 // library dependencies, since they reference both Bitcode and Assembly |
15 // functions. | 15 // functions. |
16 // | 16 // |
17 //===----------------------------------------------------------------------===// | 17 //===----------------------------------------------------------------------===// |
18 | 18 |
19 #ifndef LLVM_SUPPORT_IRREADER_H | 19 #ifndef LLVM_SUPPORT_IRREADER_H |
20 #define LLVM_SUPPORT_IRREADER_H | 20 #define LLVM_SUPPORT_IRREADER_H |
21 | 21 |
22 #include "llvm/ADT/OwningPtr.h" | 22 #include "llvm/ADT/OwningPtr.h" |
23 #include "llvm/Assembly/Parser.h" | 23 #include "llvm/Assembly/Parser.h" |
24 #include "llvm/Bitcode/BitcodeStream.h" | |
nlewycky
2011/11/05 00:45:06
Given that there's no other changes in the file, t
(google.com) Derek Schuff
2011/11/07 22:33:50
Sorry, this was leftover from a previous iteration
| |
24 #include "llvm/Bitcode/ReaderWriter.h" | 25 #include "llvm/Bitcode/ReaderWriter.h" |
25 #include "llvm/Support/MemoryBuffer.h" | 26 #include "llvm/Support/MemoryBuffer.h" |
26 #include "llvm/Support/SourceMgr.h" | 27 #include "llvm/Support/SourceMgr.h" |
27 #include "llvm/Support/system_error.h" | 28 #include "llvm/Support/system_error.h" |
28 | 29 |
29 namespace llvm { | 30 namespace llvm { |
30 | 31 |
31 /// If the given MemoryBuffer holds a bitcode image, return a Module for it | 32 /// If the given MemoryBuffer holds a bitcode image, return a Module for it |
32 /// which does lazy deserialization of function bodies. Otherwise, attempt to | 33 /// which does lazy deserialization of function bodies. Otherwise, attempt to |
33 /// parse it as LLVM Assembly and return a fully populated Module. This | 34 /// parse it as LLVM Assembly and return a fully populated Module. This |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 "Could not open input file: " + ec.message()); | 104 "Could not open input file: " + ec.message()); |
104 return 0; | 105 return 0; |
105 } | 106 } |
106 | 107 |
107 return ParseIR(File.take(), Err, Context); | 108 return ParseIR(File.take(), Err, Context); |
108 } | 109 } |
109 | 110 |
110 } | 111 } |
111 | 112 |
112 #endif | 113 #endif |
OLD | NEW |