1"""This file contains BUILD extensions for building llvm_openmp.
2TODO(Intel-tf): Delete this and reuse a similar function in third_party/llvm
3after the TF 2.4 branch cut has passed.
4"""
5
6def dict_add(*dictionaries):
7    """Returns a new `dict` that has all the entries of the given dictionaries.
8
9    If the same key is present in more than one of the input dictionaries, the
10    last of them in the argument list overrides any earlier ones.
11
12    Args:
13      *dictionaries: Zero or more dictionaries to be added.
14
15    Returns:
16      A new `dict` that has all the entries of the given dictionaries.
17    """
18    result = {}
19    for d in dictionaries:
20        result.update(d)
21    return result
22