Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Side by Side Diff: lib/Transforms/MinSFI/Utils.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //===-- Utils.cpp - Helper functions for MinSFI passes --------------------===//
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 #include "llvm/Support/CommandLine.h"
11 #include "llvm/Transforms/MinSFI.h"
12
13 using namespace llvm;
14
15 static cl::opt<uint32_t>
16 PointerSizeInBits("minsfi-ptrsize", cl::init(32),
17 cl::desc("Size of the address subspace in bits"));
18
19 uint32_t minsfi::GetPointerSizeInBits() {
20 if (PointerSizeInBits < 20 || PointerSizeInBits > 32)
21 report_fatal_error("MinSFI: Size of the sandboxed pointers is out of "
22 "bounds (20-32)");
23 return PointerSizeInBits;
24 }
25
26 uint64_t minsfi::GetAddressSubspaceSize() {
27 return 1LL << GetPointerSizeInBits();
28 }
OLDNEW
« no previous file with comments | « lib/Transforms/MinSFI/SubstituteUndefs.cpp ('k') | lib/Transforms/NaCl/AddPNaClExternalDecls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698