constant.h 823 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_LOWER_CONSTANT_H_
  5. #define CARBON_TOOLCHAIN_LOWER_CONSTANT_H_
  6. #include "llvm/ADT/ArrayRef.h"
  7. #include "toolchain/lower/file_context.h"
  8. namespace Carbon::Lower {
  9. // Forms LLVM constant values for all constants used in the file described by
  10. // `file_context`. The indexes in the `constants` array corresponding to
  11. // template constant instructions are populated with corresponding constant
  12. // values.
  13. auto LowerConstants(FileContext& file_context,
  14. llvm::MutableArrayRef<llvm::Constant*> constants) -> void;
  15. } // namespace Carbon::Lower
  16. #endif // CARBON_TOOLCHAIN_LOWER_CONSTANT_H_