brintos

brintos / llvm-project-archived public Read only

0
0
Text · 806 B · b845478 Raw
30 lines · cpp
1//===- DXContainerObject.cpp ----------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "DXContainerObject.h"10 11namespace llvm {12namespace objcopy {13namespace dxbc {14 15Error Object::removeParts(PartPred ToRemove) {16  erase_if(Parts, ToRemove);17  return Error::success();18}19 20void Object::recomputeHeader() {21  Header.FileSize = headerSize();22  Header.PartCount = Parts.size();23  for (const Part &P : Parts)24    Header.FileSize += P.size();25}26 27} // end namespace dxbc28} // end namespace objcopy29} // end namespace llvm30