1 //===------------- MemoryFlags.cpp - Memory allocation flags --------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/ExecutionEngine/JITLink/MemoryFlags.h"
12 #define DEBUG_TYPE "jitlink"
17 raw_ostream
&operator<<(raw_ostream
&OS
, MemProt MP
) {
18 return OS
<< (((MP
& MemProt::Read
) != MemProt::None
) ? 'R' : '-')
19 << (((MP
& MemProt::Write
) != MemProt::None
) ? 'W' : '-')
20 << (((MP
& MemProt::Exec
) != MemProt::None
) ? 'X' : '-');
23 raw_ostream
&operator<<(raw_ostream
&OS
, MemDeallocPolicy MDP
) {
24 return OS
<< (MDP
== MemDeallocPolicy::Standard
? "standard" : "finalize");
27 raw_ostream
&operator<<(raw_ostream
&OS
, AllocGroup AG
) {
28 return OS
<< '(' << AG
.getMemProt() << ", " << AG
.getMemDeallocPolicy()
32 } // end namespace jitlink
33 } // end namespace llvm