LLVM: include/llvm/MC/MCContext.h File Reference (original) (raw)

Go to the source code of this file.

Namespaces
namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
namespace llvm::wasm
Functions
void * operator new (size_t Bytes, llvm::MCContext &C, size_t Alignment=8) noexcept
Placement new for using the MCContext's allocator.
void operator delete (void *Ptr, llvm::MCContext &C, size_t) noexcept
Placement delete companion to the new above.
void * operator new[] (size_t Bytes, llvm::MCContext &C, size_t Alignment=8) noexcept
This placement form of operator new[] uses the MCContext's allocator for obtaining memory.
void operator delete[] (void *Ptr, llvm::MCContext &C) noexcept
Placement delete[] companion to the new[] above.

operator delete()

void operator delete ( void * Ptr, llvm::MCContext & C, size_t ) inlinenoexcept

Placement delete companion to the new above.

This operator is just a companion to the new above. There is no way of invoking it directly; see the new operator for more details. This operator is called implicitly by the compiler if a placement new expression using the MCContext throws in the object constructor.

Definition at line 898 of file MCContext.h.

References C().

operator delete[]()

Placement delete[] companion to the new[] above.

This operator is just a companion to the new[] above. There is no way of invoking it directly; see the new[] operator for more details. This operator is called implicitly by the compiler if a placement new[] expression using the MCContext throws in the object constructor.

Definition at line 932 of file MCContext.h.

References C().

operator new()

void * operator new ( size_t Bytes, llvm::MCContext & C, size_t Alignment = 8 ) inlinenoexcept

Placement new for using the MCContext's allocator.

This placement form of operator new uses the MCContext's allocator for obtaining memory. It is a non-throwing new, which means that it returns null on error. (If that is what the allocator does. The current does, so if this ever changes, this operator will have to be changed, too.) Usage looks like this (assuming there's an MCContext 'Context' in scope):

nvptx lower Lower arguments(NVPTX)"

Please note that you cannot use delete on the pointer; it must be deallocated using an explicit destructor call followed by Context.Deallocate(Ptr).

Parameters

Bytes The number of bytes to allocate. Calculated by the compiler.
C The MCContext that provides the allocator.
Alignment The alignment of the allocated memory (if the underlying allocator supports it).

Returns

The allocated memory. Could be NULL.

Definition at line 888 of file MCContext.h.

References C().

operator new[]()

void * operator new[] ( size_t Bytes, llvm::MCContext & C, size_t Alignment = 8 ) inlinenoexcept

This placement form of operator new[] uses the MCContext's allocator for obtaining memory.

It is a non-throwing new[], which means that it returns null on error. Usage looks like this (assuming there's an MCContext 'Context' in scope):

Please note that you cannot use delete on the pointer; it must be deallocated using an explicit destructor call followed by Context.Deallocate(Ptr).

Parameters

Bytes The number of bytes to allocate. Calculated by the compiler.
C The MCContext that provides the allocator.
Alignment The alignment of the allocated memory (if the underlying allocator supports it).

Returns

The allocated memory. Could be NULL.

Definition at line 921 of file MCContext.h.

References C().