LLVM: lib/ExecutionEngine/Orc/Shared/AllocationActions.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

10

11namespace llvm {

12namespace orc {

14

15Expected<std::vector>

17 std::vector DeallocActions;

19

20 for (auto &AA : AAs) {

21 if (AA.Finalize)

22 if (auto Err = AA.Finalize.runWithSPSRetErrorMerged())

24

25 if (AA.Dealloc)

26 DeallocActions.push_back(std::move(AA.Dealloc));

27 }

28

29 AAs.clear();

30 return DeallocActions;

31}

32

35 while (!DAs.empty()) {

36 Err = joinErrors(std::move(Err), DAs.back().runWithSPSRetErrorMerged());

38 }

39 return Err;

40}

41

42}

43}

44}

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

const T & back() const

back - Get the last element.

ArrayRef< T > drop_back(size_t N=1) const

Drop the last N elements of the array.

bool empty() const

empty - Check if the array is empty.

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

Abstract Attribute helper functions.

This is an optimization pass for GlobalISel generic memory operations.

Error joinErrors(Error E1, Error E2)

Concatenate errors.