[ptr-traits] Merge the MetadataTracking helpers into the Metadata
authorChandler Carruth <chandlerc@gmail.com>
Tue, 29 Dec 2015 02:14:50 +0000 (02:14 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 29 Dec 2015 02:14:50 +0000 (02:14 +0000)
commit9bdbabc1b2875e6a7dd5d5e0702c6570d2aacbbf
tree07f7b6b87dba4a0494fe41f7f03bf39feb3af259
parent5c35f963fb19dbd9961d8df73a4e3cdf1fd219fd
[ptr-traits] Merge the MetadataTracking helpers into the Metadata
header.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

The MetadataTracking helpers aren't actually independent. They rely on
constructing a PointerUnion between Metadata and MetadataAsValue
pointers, which requires know the alignment of pointers to those types
which requires them to be complete.

The .cpp file even defined a method declared in Metadata.h! These really
don't seem like something that is separable, and there is no real
layering problem with just placing them together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256531 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Metadata.h
include/llvm/IR/MetadataTracking.h [deleted file]
include/llvm/IR/TrackingMDRef.h
lib/IR/CMakeLists.txt
lib/IR/Metadata.cpp
lib/IR/MetadataTracking.cpp [deleted file]