LLVM: lib/Support/VirtualOutputFile.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

18

19using namespace llvm;

21

24

25void OutputFileImpl::anchor() {}

26void NullOutputFileImpl::anchor() {}

27

45

47 if (OpenProxy)

49

50 return std::make_unique(OpenProxy, getOS());

51}

52

54

58

59

60

61

62

67

68 Error E = Impl->keep();

69 Impl = nullptr;

70 DiscardOnDestroyHandler = nullptr;

71 return E;

72}

73

75

79

80

81

82

83

84 if (OpenProxy)

85 OpenProxy->resetProxy();

86

87 Error E = Impl->discard();

88 Impl = nullptr;

89 DiscardOnDestroyHandler = nullptr;

90 return E;

91}

92

93void OutputFile::destroy() {

94 if (!Impl)

95 return;

96

97

98

99 auto DiscardHandler = std::move(DiscardOnDestroyHandler);

101 assert(!Impl && "Expected discard to destroy Impl");

102

103

107 std::move(E)));

108 else if (E)

109 DiscardHandler(std::move(E));

110}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

#define LLVM_UNLIKELY(EXPR)

This file contains the declarations of the OutputError class.

This file contains the declarations of the llvm::vfs::OutputFile class, which is a virtualized output...

TrackedProxy(TrackedProxy *&TrackingPointer, raw_pwrite_stream &OS)

Definition VirtualOutputFile.cpp:35

void resetProxy()

Definition VirtualOutputFile.cpp:30

~TrackedProxy() override

Definition VirtualOutputFile.cpp:41

TrackedProxy *& TrackingPointer

Definition VirtualOutputFile.cpp:43

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

raw_pwrite_stream_proxy(raw_pwrite_stream &OS)

raw_pwrite_stream(bool Unbuffered=false, OStreamKind K=OStreamKind::OK_OStream)

StringRef getPath() const

raw_pwrite_stream & getOS()

LLVM_ABI Expected< std::unique_ptr< raw_pwrite_stream > > createProxy()

Create a proxy stream for clients that need to pass an owned stream to a producer.

Definition VirtualOutputFile.cpp:46

LLVM_ABI Error discard()

Discard an output, cleaning up any temporary state.

Definition VirtualOutputFile.cpp:74

LLVM_ABI Error keep()

Keep an output.

Definition VirtualOutputFile.cpp:53

This is an optimization pass for GlobalISel generic memory operations.

Error joinErrors(Error E1, Error E2)

Concatenate errors.

LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.