[llvm] [RemoveDIs] Add bitcode format (PR #83251)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 03:44:57 PST 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 3356818eed3224c50012f8ed2bfa046f2bc8e154 9dee1a8edc8d5e68bc7a950930678343e632965e -- llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp llvm/lib/Bitcode/Writer/ValueEnumerator.cpp llvm/lib/IR/BasicBlock.cpp llvm/lib/IR/Verifier.cpp llvm/lib/Linker/IRMover.cpp llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp llvm/tools/llvm-as/llvm-as.cpp llvm/tools/verify-uselistorder/verify-uselistorder.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/Bitcode/LLVMBitCodes.h b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
index 528a6baa48..81f505e0e3 100644
--- a/llvm/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
@@ -633,7 +633,7 @@ enum FunctionCodes {
       63, // [DILocation, DILocalVariable, DIExpression, ValueAsMetadata,
           //  DIAssignID, DIExpression (addr), ValueAsMetadata (addr)]
   FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE =
-      64,  // [DILocation, DILocalVariable, DIExpression, Value]
+      64, // [DILocation, DILocalVariable, DIExpression, Value]
   FUNC_CODE_DEBUG_RECORD_LABEL = 65, // DPVALUE: [DILocation, DILabel]
 };
 
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 8bd5913c7e..509e6df8c2 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3519,7 +3519,8 @@ void ModuleBitcodeWriter::writeFunction(
         /// Try to push the value only (unwrapped), otherwise push the
         /// metadata wrapped value. Returns true if the value was pushed
         /// without the ValueAsMetadata wrapper.
-        auto PushValueOrMetadata = [&Vals, InstID, this](Metadata *RawLocation) {
+        auto PushValueOrMetadata = [&Vals, InstID,
+                                    this](Metadata *RawLocation) {
           assert(RawLocation && "RawLocation unexpectedly null in DPValue");
           if (ValueAsMetadata *VAM = dyn_cast<ValueAsMetadata>(RawLocation)) {
             SmallVector<unsigned, 2> ValAndType;
@@ -3565,7 +3566,8 @@ void ModuleBitcodeWriter::writeFunction(
           Vals.push_back(VE.getMetadataID(DPV.getExpression()));
           if (DPV.isDbgValue()) {
             if (PushValueOrMetadata(DPV.getRawLocation()))
-              Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE, Vals, FUNCTION_DEBUG_RECORD_VALUE_ABBREV);
+              Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE, Vals,
+                                FUNCTION_DEBUG_RECORD_VALUE_ABBREV);
             else
               Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_RECORD_VALUE, Vals);
           } else if (DPV.isDbgDeclare()) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/83251


More information about the llvm-commits mailing list