From 74ca962e869ca5e8ddd6c9f2f95a4d555aa08bab Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 14 Aug 2025 16:49:50 +0000 Subject: [PATCH] review: move recomputeHeader to common point --- llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp | 1 + llvm/lib/ObjCopy/DXContainer/DXContainerObject.cpp | 1 - llvm/lib/ObjCopy/DXContainer/DXContainerObject.h | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp b/llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp index a6a978d96925..375e382ddb04 100644 --- a/llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp +++ b/llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp @@ -31,6 +31,7 @@ static Error handleArgs(const CommonConfig &Config, Object &Obj) { if (auto E = Obj.removeParts(RemovePred)) return E; + Obj.recomputeHeader(); return Error::success(); } diff --git a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.cpp b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.cpp index d7c2462d803c..b845478de16d 100644 --- a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.cpp +++ b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.cpp @@ -14,7 +14,6 @@ namespace dxbc { Error Object::removeParts(PartPred ToRemove) { erase_if(Parts, ToRemove); - recomputeHeader(); return Error::success(); } diff --git a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h index 9dcf01e3a3a2..cbb09f5ec8e0 100644 --- a/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h +++ b/llvm/lib/ObjCopy/DXContainer/DXContainerObject.h @@ -42,8 +42,6 @@ struct Object { } Error removeParts(PartPred ToRemove); - -private: void recomputeHeader(); };