//===- GlobalStatus.h - Compute status info for globals ---------*- 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 // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H #define LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H #include "llvm/IR/Instructions.h" #include "llvm/Support/AtomicOrdering.h" namespace llvm { class Constant; class Function; class Value; /// It is safe to destroy a constant iff it is only used by constants itself. /// Note that constants cannot be cyclic, so this test is pretty easy to /// implement recursively. /// bool isSafeToDestroyConstant(const Constant *C); /// As we analyze each global or thread-local variable, keep track of some /// information about it. If we find out that the address of the global is /// taken, none of this info will be accurate. struct GlobalStatus { … }; } // end namespace llvm #endif // LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H