[llvm] Add missing precondition (PR #82519)

Dave Abrahams via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 10:29:10 PST 2024


https://github.com/dabrahams created https://github.com/llvm/llvm-project/pull/82519

The function asserts if the condition isn't satisfied.

>From d8c9dc14586b69b7a896b31cf0925db62b0d8dfd Mon Sep 17 00:00:00 2001
From: Dave Abrahams <dabrahams at adobe.com>
Date: Wed, 21 Feb 2024 10:28:50 -0800
Subject: [PATCH] Add missing precondition

The function asserts if the condition isn't satisfied.
---
 llvm/include/llvm-c/Core.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 09746bdaf0c94e..a0f8404df3c4ab 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -2185,6 +2185,7 @@ LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
 /**
  * Returns true if the specified constant is an array of i8.
  *
+ * @pre LLVMIsAConstantDataSequential(c) != 0
  * @see ConstantDataSequential::getAsString()
  */
 LLVMBool LLVMIsConstantString(LLVMValueRef c);



More information about the llvm-commits mailing list