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

Side by Side Diff: sandbox/linux/seccomp-bpf/codegen.h

Issue 570163003: Large IWYU cleanup for seccomp-bpf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trap-errorcode
Patch Set: Sort #includes Created 6 years, 3 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
« no previous file with comments | « sandbox/linux/seccomp-bpf/bpf_tests.h ('k') | sandbox/linux/seccomp-bpf/codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__ 6 #define SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__
7 7
8 #include <map> 8 #include <map>
9 #include <set>
10 #include <vector> 9 #include <vector>
11 10
12 #include "sandbox/linux/seccomp-bpf/basicblock.h"
13 #include "sandbox/linux/seccomp-bpf/instruction.h"
14 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 11 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
15 #include "sandbox/sandbox_export.h" 12 #include "sandbox/sandbox_export.h"
16 13
17 namespace sandbox { 14 namespace sandbox {
15 struct BasicBlock;
16 class ErrorCode;
17 struct Instruction;
18 18
19 typedef std::vector<Instruction*> Instructions; 19 typedef std::vector<Instruction*> Instructions;
20 typedef std::vector<BasicBlock*> BasicBlocks; 20 typedef std::vector<BasicBlock*> BasicBlocks;
21 typedef std::map<const Instruction*, int> BranchTargets; 21 typedef std::map<const Instruction*, int> BranchTargets;
22 typedef std::map<const Instruction*, BasicBlock*> TargetsToBlocks; 22 typedef std::map<const Instruction*, BasicBlock*> TargetsToBlocks;
23 typedef std::map<const BasicBlock*, int> IncomingBranches; 23 typedef std::map<const BasicBlock*, int> IncomingBranches;
24 24
25 // The code generator instantiates a basic compiler that can convert a 25 // The code generator instantiates a basic compiler that can convert a
26 // graph of BPF instructions into a well-formed stream of BPF instructions. 26 // graph of BPF instructions into a well-formed stream of BPF instructions.
27 // Most notably, it ensures that jumps are always forward and don't exceed 27 // Most notably, it ensures that jumps are always forward and don't exceed
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 BasicBlocks basic_blocks_; 151 BasicBlocks basic_blocks_;
152 152
153 // Compile() must only ever be called once as it makes destructive changes 153 // Compile() must only ever be called once as it makes destructive changes
154 // to the DAG. 154 // to the DAG.
155 bool compiled_; 155 bool compiled_;
156 }; 156 };
157 157
158 } // namespace sandbox 158 } // namespace sandbox
159 159
160 #endif // SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__ 160 #endif // SANDBOX_LINUX_SECCOMP_BPF_CODEGEN_H__
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/bpf_tests.h ('k') | sandbox/linux/seccomp-bpf/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698