From 7d9d9afca93152bb4d43cc9cc6d62bc6ba94f57b Mon Sep 17 00:00:00 2001 From: David Holland Date: Wed, 8 Jan 2025 17:08:35 -0500 Subject: [PATCH] Mark llvm_struct deprecated. Add changelog entry. --- CHANGES.md | 7 +++++++ src/SAWScript/Interpreter.hs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 4c8d96fcb..fa1d55ce3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,13 @@ * Add `mir_equal` and `jvm_equal` commands, which mirror the `llvm_equal` command for the MIR and JVM backends, respectively. +## Deprecations + +* `llvm_struct` has been marked deprecated. +It is the same as `llvm_alias` and you should use this instead. +(If you were looking for a function to create a struct type from its +contents, that's `llvm_struct_type`.) + ## Bug fixes * SAW now accepts Unicode input beyond characters 0..255, including in diff --git a/src/SAWScript/Interpreter.hs b/src/SAWScript/Interpreter.hs index f8eabba88..8a64664cc 100644 --- a/src/SAWScript/Interpreter.hs +++ b/src/SAWScript/Interpreter.hs @@ -2773,8 +2773,9 @@ primitives = Map.fromList ] , prim "llvm_struct" "String -> LLVMType" (pureVal llvm_alias) - Current + Deprecated [ "Legacy alternative name for `llvm_alias`." + , "If you are trying to cons a struct type by its contents, you want llvm_struct_type." ] , prim "llvm_pointer" "LLVMType -> LLVMType"