[XCOFF] make .file directive have directory info
authorChen Zheng <czhengsz@cn.ibm.com>
Mon, 26 Apr 2021 05:31:23 +0000 (01:31 -0400)
committerChen Zheng <czhengsz@cn.ibm.com>
Tue, 27 Apr 2021 04:15:23 +0000 (00:15 -0400)
commite5000eef81354aa755caa25b317e205364f444e0
tree189498f75dc6e932c4f58b9d73197b1f54e7ffc2
parent1798f2289aaaf07853857d5360d79a2bfb0fd054
[XCOFF] make .file directive have directory info

The .file directive is changed to only have basename in D36018 for
ELF.

But on AIX, we require the .file directive to also contain the
directory info. This aligns with other AIX compiler like XLC and is
required by some AIX tool like DBX.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D99785
llvm/include/llvm/MC/MCAsmInfo.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/MC/MCAsmInfoXCOFF.cpp
llvm/test/CodeGen/PowerPC/aix-filename-absolute-path.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/aix-filename-relative-path.ll [new file with mode: 0644]