OLD | NEW |
(Empty) | |
| 1 //===-- MinSFI.h - MinSFI Transformations -----------------------*- C++ -*-===// |
| 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 |
| 10 #ifndef LLVM_TRANSFORMS_MINSFI_H |
| 11 #define LLVM_TRANSFORMS_MINSFI_H |
| 12 |
| 13 #include "llvm/CodeGen/Passes.h" |
| 14 #include "llvm/Support/DataTypes.h" |
| 15 |
| 16 namespace llvm { |
| 17 namespace minsfi { |
| 18 |
| 19 // Returns the bit size of sandboxed pointers. The default value is 32 bits |
| 20 // and it can be set with the "-minsfi-ptrsize" command-line option. |
| 21 uint32_t GetPointerSizeInBits(); |
| 22 |
| 23 // Returns the number of bytes addressable by the sandbox. This value is given |
| 24 // by the size of the sandboxed pointers. |
| 25 uint64_t GetAddressSubspaceSize(); |
| 26 |
| 27 // The name of MinSFI's entry function which will be invoked by the runtime. |
| 28 extern const char EntryFunctionName[]; |
| 29 |
| 30 } // namespace minsfi |
| 31 |
| 32 FunctionPass *createSubstituteUndefsPass(); |
| 33 ModulePass *createAllocateDataSegmentPass(); |
| 34 ModulePass *createExpandAllocasPass(); |
| 35 ModulePass *createRenameEntryPointPass(); |
| 36 ModulePass *createSandboxIndirectCallsPass(); |
| 37 ModulePass *createSandboxMemoryAccessesPass(); |
| 38 |
| 39 void MinSFIPasses(PassManagerBase &PM); |
| 40 |
| 41 } // namespace llvm |
| 42 |
| 43 #endif |
OLD | NEW |