Randstruct.h 1.2 KB

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