[clang] [llvm] IR: Store the default subtarget info in named metadata instead of the context. (PR #98673)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 11:15:52 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 3a744283f4c56b57adb2c381c0aeaf7faf5120ec 6976f169ec1befd902d0a0d0cc05b375d6ae094b --extensions h,cpp -- clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CodeGenAction.cpp llvm/include/llvm/IR/LLVMContext.h llvm/include/llvm/IR/Module.h llvm/lib/IR/Function.cpp llvm/lib/IR/LLVMContext.cpp llvm/lib/IR/Module.cpp llvm/lib/Linker/IRMover.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 8120cccace..15697b4c06 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -387,6 +387,4 @@ void LLVMContext::setOpaquePointers(bool Enable) const {
   assert(Enable && "Cannot disable opaque pointers");
 }
 
-bool LLVMContext::supportsTypedPointers() const {
-  return false;
-}
+bool LLVMContext::supportsTypedPointers() const { return false; }
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index 6717ab4434..7416f97a90 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -1247,7 +1247,7 @@ void IRLinker::linkNamedMDNodes() {
     // different subtarget info.
     if (NMD.getName() == "llvm.subtarget.info")
       continue;
-      
+
     NamedMDNode *DestNMD = DstM.getOrInsertNamedMetadata(NMD.getName());
     // Add Src elements into Dest node.
     for (const MDNode *Op : NMD.operands())

``````````

</details>


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


More information about the llvm-commits mailing list