LLVM  15.0.0git
MemoryFlags.cpp
Go to the documentation of this file.
1 //===------------- MemoryFlags.cpp - Memory allocation flags --------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
11 
12 #define DEBUG_TYPE "jitlink"
13 
14 namespace llvm {
15 namespace jitlink {
16 
18  return OS << (((MP & MemProt::Read) != MemProt::None) ? 'R' : '-')
19  << (((MP & MemProt::Write) != MemProt::None) ? 'W' : '-')
20  << (((MP & MemProt::Exec) != MemProt::None) ? 'X' : '-');
21 }
22 
24  return OS << (MDP == MemDeallocPolicy::Standard ? "standard" : "finalize");
25 }
26 
28  return OS << '(' << AG.getMemProt() << ", " << AG.getMemDeallocPolicy()
29  << ')';
30 }
31 
32 } // end namespace jitlink
33 } // end namespace llvm
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
MemoryFlags.h
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54