This change is required by https://reviews.llvm.org/D108363.
This change exposes addAliasScopeMetadata() to the llvm namespace and extends
it beyond the inliner requirements. We're not changing the existing use of
addAliasScopeMetadata() within InlineFunction.cpp which works on the CallBase
with a ValueToValueMap. We're generalizing this function in such a way that
it works on a Function without an explicit ValueToValueMap.
This is just to maintain the original indentation of the snippet in the loop that we've converted to a lambda expression. Removing this can introduce unrelated changes in the diff which might make the review more difficult.