comparison include/llvm/Support/MemoryBuffer.h @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 60c9769439b8
children 7d135dc70f03
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
15 #define LLVM_SUPPORT_MEMORYBUFFER_H 15 #define LLVM_SUPPORT_MEMORYBUFFER_H
16 16
17 #include "llvm-c/Support.h" 17 #include "llvm-c/Support.h"
18 #include "llvm/ADT/Twine.h" 18 #include "llvm/ADT/Twine.h"
19 #include "llvm/Support/CBindingWrapping.h" 19 #include "llvm/Support/CBindingWrapping.h"
20 #include "llvm/Support/Compiler.h"
21 #include "llvm/Support/DataTypes.h" 20 #include "llvm/Support/DataTypes.h"
22 #include "llvm/Support/ErrorOr.h" 21 #include "llvm/Support/ErrorOr.h"
23 #include <memory> 22 #include <memory>
24 #include <system_error>
25 23
26 namespace llvm { 24 namespace llvm {
27 class MemoryBufferRef; 25 class MemoryBufferRef;
28 26
29 /// This interface provides simple read-only access to a block of memory, and 27 /// This interface provides simple read-only access to a block of memory, and
124 /// Open the specified file as a MemoryBuffer, or open stdin if the Filename 122 /// Open the specified file as a MemoryBuffer, or open stdin if the Filename
125 /// is "-". 123 /// is "-".
126 static ErrorOr<std::unique_ptr<MemoryBuffer>> 124 static ErrorOr<std::unique_ptr<MemoryBuffer>>
127 getFileOrSTDIN(const Twine &Filename, int64_t FileSize = -1); 125 getFileOrSTDIN(const Twine &Filename, int64_t FileSize = -1);
128 126
129 /// Map a subrange of the the specified file as a MemoryBuffer. 127 /// Map a subrange of the specified file as a MemoryBuffer.
130 static ErrorOr<std::unique_ptr<MemoryBuffer>> 128 static ErrorOr<std::unique_ptr<MemoryBuffer>>
131 getFileSlice(const Twine &Filename, uint64_t MapSize, uint64_t Offset); 129 getFileSlice(const Twine &Filename, uint64_t MapSize, uint64_t Offset);
132 130
133 //===--------------------------------------------------------------------===// 131 //===--------------------------------------------------------------------===//
134 // Provided for performance analysis. 132 // Provided for performance analysis.