scudo: Make prepareTaggedChunk() and resizeTaggedChunk() generic.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 20 Apr 2021 21:54:32 +0000 (14:54 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 21 Apr 2021 20:53:39 +0000 (13:53 -0700)
commit3d47e003e922d5a7c18575f9c30a3098ccdb3040
tree009e8835a6cab64f20735d1346d5c97017e3f620
parent46c59d91dc7a39cc98be7a68d6dc60f3e8a35df0
scudo: Make prepareTaggedChunk() and resizeTaggedChunk() generic.

Now that we have a more efficient implementation of storeTags(),
we should start using it from resizeTaggedChunk(). With that, plus
a new storeTag() function, resizeTaggedChunk() can be made generic,
and so can prepareTaggedChunk(). Make it so.

Now that the functions are generic, move them to combined.h so that
memtag.h no longer needs to know about chunks.

Differential Revision: https://reviews.llvm.org/D100911
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/lib/scudo/standalone/memtag.h