Go to file
Reid Kleckner 98bbd07cc3 [MC] Enable .file support on COFF and diagnose it on unsupported targets
Summary:
The "single parameter" .file directive appears to be an ELF-only feature
that is intended to insert the main source filename into the string
table table.

I noticed that if you assemble an ELF .s file for COFF, typically it
will assert right away on a .file directive near the top of the file. My
first change was to make this emit a proper error in the asm parser so
that we don't assert so easily.

However, COFF actually does have some support for this directive, and if
you emit an object file, llvm-mc does not assert. When emitting a COFF
object, MC will take those file names and create "debug" symbol table
entries for them. I'm not familiar with these kinds of symbol table
entries, and I'm not aware of any users of them, but @compnerd added
them a while ago. They don't introduce absolute paths, and most main
source file paths are short enough that this extra entry shouldn't cause
any problems, so I enabled the flag in MCAsmInfoCOFF that indicates that
it's supported.

This has the side effect of adding an extra debug symbol to every object
produced by clang, which is a pretty big functional change. My question
is, should we keep the functionality or remove it in the name of symbol
table minimalism?

Reviewers: mstorsjo, compnerd

Subscribers: hiraditya, compnerd, llvm-commits

Differential Revision: https://reviews.llvm.org/D55900

llvm-svn: 349976
2018-12-21 23:35:48 +00:00
clang Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC. 2018-12-21 21:11:36 +00:00
clang-tools-extra [clang-tidy] Be more liberal about literal zeroes in abseil checks 2018-12-21 21:07:11 +00:00
compiler-rt Fix comment typo. 2018-12-21 21:41:43 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx [libcxx] Remove unused macro _LIBCPP_HAS_UNIQUE_TYPEINFO 2018-12-21 20:14:43 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [SEH] Add initial support for AArch64 2018-12-18 20:05:59 +00:00
lld keymethod -> keyfunction 2018-12-21 22:57:11 +00:00
lldb [NFC] Replace `compare` with (in)equality operator where applicable. 2018-12-21 22:46:10 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [MC] Enable .file support on COFF and diagnose it on unsupported targets 2018-12-21 23:35:48 +00:00
openmp [Tests] [OpenMP] XFAIL also for ppc64le. 2018-12-18 19:05:07 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
pstl [pstl] Initial integration with LLVM's CMake 2018-12-21 15:59:04 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.