ReplaceConstant.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ReplaceConstant.h - Replacing LLVM constant expressions --*- 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 declares the utility function for replacing LLVM constant
  15. // expressions by instructions.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_IR_REPLACECONSTANT_H
  19. #define LLVM_IR_REPLACECONSTANT_H
  20. #include "llvm/IR/Constants.h"
  21. #include "llvm/IR/Instruction.h"
  22. namespace llvm {
  23. /// Create a replacement instruction for constant expression \p CE and insert
  24. /// it before \p Instr.
  25. Instruction *createReplacementInstr(ConstantExpr *CE, Instruction *Instr);
  26. } // end namespace llvm
  27. #endif // LLVM_IR_REPLACECONSTANT_H
  28. #ifdef __GNUC__
  29. #pragma GCC diagnostic pop
  30. #endif