IR Linking: Support merging Warning+Max module metadata flags
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 6 Feb 2020 22:37:23 +0000 (14:37 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 8 Feb 2020 00:29:58 +0000 (16:29 -0800)
commitba9cae58bbdd41451ee67773c9d0f90a01756f12
tree589e70d38cd5eb43e6f8c4fe80895a092ecbe334
parent35c63d66aaae65a7004d94e0a6668ff19612ba5e
IR Linking: Support merging Warning+Max module metadata flags

Summary:
Debug Info Version was changed to use "Max" instead of "Warning" per the
original design intent - but this maxes old/new IR unlinkable, since
mismatched merge styles are a linking failure.

It seems possible/maybe reasonable to actually support the combination
of these two flags: Warn, but then use the maximum value rather than the
first value/earlier module's value.

Reviewers: tejohnson

Differential Revision: https://reviews.llvm.org/D74257
llvm/docs/LangRef.rst
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/Inputs/module-max-warn.ll [new file with mode: 0644]
llvm/test/Linker/module-max-warn.ll [new file with mode: 0644]