Co-authored-by: Cole Nixon <nixontc...@gmail.com> Co-authored-by: Connor Kuehl <cipku...@gmail.com> Co-authored-by: James Foster <jafoste...@gmail.com> Co-authored-by: Jeff Takahashi <jeffrey.takaha...@gmail.com> Co-authored-by: Jordan Cantrell <jordan.cantr...@mail.com> Co-authored-by: Nikk Forbus <nicholas.for...@gmail.com> Co-authored-by: Tim Pugh <nwtp...@gmail.com> --- clang/include/clang/AST/RandstructSeed.h | 8 ++++++++ clang/lib/AST/CMakeLists.txt | 1 + clang/lib/AST/RecordFieldReorganizer.cpp | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 clang/include/clang/AST/RandstructSeed.h create mode 100644 clang/lib/AST/RecordFieldReorganizer.cpp
diff --git a/clang/include/clang/AST/RandstructSeed.h b/clang/include/clang/AST/RandstructSeed.h new file mode 100644 index 00000000000..eefdd8916f4 --- /dev/null +++ b/clang/include/clang/AST/RandstructSeed.h @@ -0,0 +1,8 @@ +#ifndef RANDSTRUCTSEED_H +#define RANDSTRUCTSEED_H +#include <string> +namespace clang { +extern std::string RandstructSeed; +extern bool RandstructAutoSelect; +} +#endif diff --git a/clang/lib/AST/CMakeLists.txt b/clang/lib/AST/CMakeLists.txt index 570ca718acf..08acf687971 100644 --- a/clang/lib/AST/CMakeLists.txt +++ b/clang/lib/AST/CMakeLists.txt @@ -44,6 +44,7 @@ add_clang_library(clangAST InheritViz.cpp ItaniumCXXABI.cpp ItaniumMangle.cpp + RecordFieldReorganizer.cpp Mangle.cpp MicrosoftCXXABI.cpp MicrosoftMangle.cpp diff --git a/clang/lib/AST/RecordFieldReorganizer.cpp b/clang/lib/AST/RecordFieldReorganizer.cpp new file mode 100644 index 00000000000..c7ab9cd16d4 --- /dev/null +++ b/clang/lib/AST/RecordFieldReorganizer.cpp @@ -0,0 +1,19 @@ +//===----- RecordFieldReorganizer.cpp - Implementation for field reorder -*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Contains the implementation for RecordDecl field reordering. +// +//===----------------------------------------------------------------------===// + +#include "clang/AST/RandstructSeed.h" + +namespace clang { +std::string RandstructSeed = ""; +bool RandstructAutoSelect = false; +} // namespace clang -- 2.17.1 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits