1 //===- Randstruct.h - Interfact for structure randomization -------*- C++ -*-=//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the interface for Clang's structure field layout
10 // randomization.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_AST_RANDSTRUCT_H
15 #define LLVM_CLANG_AST_RANDSTRUCT_H
16 
17 namespace llvm {
18 template <typename T> class SmallVectorImpl;
19 } // end namespace llvm
20 
21 namespace clang {
22 
23 class ASTContext;
24 class Decl;
25 class RecordDecl;
26 
27 namespace randstruct {
28 
29 bool randomizeStructureLayout(const ASTContext &Context, RecordDecl *RD,
30                               llvm::SmallVectorImpl<Decl *> &FinalOrdering);
31 
32 } // namespace randstruct
33 } // namespace clang
34 
35 #endif // LLVM_CLANG_AST_RANDSTRUCT_H
36