[llvm] [LLVM-C] Add bindings to `Instruction::getDbgRecordRange()` (PR #107802)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 8 20:33:05 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 0f5033053a3d4dcf27cd488a360e64c48a36c27a ae324c37a78cc19f1db01f9962100bfb5255e2ad --extensions cpp,c,h -- llvm/include/llvm-c/Core.h llvm/lib/IR/Core.cpp llvm/tools/llvm-c-test/debuginfo.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/tools/llvm-c-test/debuginfo.c b/llvm/tools/llvm-c-test/debuginfo.c
index f068da1d0a..1331a7ad46 100644
--- a/llvm/tools/llvm-c-test/debuginfo.c
+++ b/llvm/tools/llvm-c-test/debuginfo.c
@@ -11,10 +11,10 @@
|* *|
\*===----------------------------------------------------------------------===*/
+#include "llvm-c/DebugInfo.h"
#include "llvm-c-test.h"
#include "llvm-c/Core.h"
#include "llvm-c/Types.h"
-#include "llvm-c/DebugInfo.h"
#include <assert.h>
#include <stdio.h>
@@ -175,20 +175,19 @@ int llvm_test_dibuilder(void) {
43, Int64Ty, true, 0, 0);
LLVMValueRef FooVal1 = LLVMConstInt(LLVMInt64Type(), 0, false);
LLVMMetadataRef FooVarValueExpr1 =
- LLVMDIBuilderCreateConstantValueExpression(DIB, 0);
+ LLVMDIBuilderCreateConstantValueExpression(DIB, 0);
- LLVMDIBuilderInsertDbgValueRecordAtEnd(DIB, FooVal1, FooVar1, FooVarValueExpr1,
- FooVarsLocation, FooVarBlock);
+ LLVMDIBuilderInsertDbgValueRecordAtEnd(
+ DIB, FooVal1, FooVar1, FooVarValueExpr1, FooVarsLocation, FooVarBlock);
- LLVMMetadataRef FooVar2 =
- LLVMDIBuilderCreateAutoVariable(DIB, FooLexicalBlock, "e", 1, File,
- 44, Int64Ty, true, 0, 0);
+ LLVMMetadataRef FooVar2 = LLVMDIBuilderCreateAutoVariable(
+ DIB, FooLexicalBlock, "e", 1, File, 44, Int64Ty, true, 0, 0);
LLVMValueRef FooVal2 = LLVMConstInt(LLVMInt64Type(), 1, false);
LLVMMetadataRef FooVarValueExpr2 =
- LLVMDIBuilderCreateConstantValueExpression(DIB, 1);
+ LLVMDIBuilderCreateConstantValueExpression(DIB, 1);
- LLVMDIBuilderInsertDbgValueRecordAtEnd(DIB, FooVal2, FooVar2, FooVarValueExpr2,
- FooVarsLocation, FooVarBlock);
+ LLVMDIBuilderInsertDbgValueRecordAtEnd(
+ DIB, FooVal2, FooVar2, FooVarValueExpr2, FooVarsLocation, FooVarBlock);
LLVMMetadataRef MacroFile =
LLVMDIBuilderCreateTempMacroFile(DIB, NULL, 0, File);
@@ -255,7 +254,8 @@ int llvm_test_dibuilder(void) {
LLVMDbgRecordRef AddDbgRecordLast = LLVMGetLastDbgRecord(Add);
assert(AddDbgRecordLast != NULL);
assert(AddDbgRecordSecond == AddDbgRecordLast);
- LLVMDbgRecordRef AddDbgRecordOverTheRange = LLVMGetNextDbgRecord(AddDbgRecordSecond);
+ LLVMDbgRecordRef AddDbgRecordOverTheRange =
+ LLVMGetNextDbgRecord(AddDbgRecordSecond);
assert(AddDbgRecordOverTheRange == NULL);
char *MStr = LLVMPrintModuleToString(M);
``````````
</details>
https://github.com/llvm/llvm-project/pull/107802
More information about the llvm-commits
mailing list