llvm-project/llvm/lib/Object
Rafael Espindola 9f92995781 Don't pass the code model to MC
I was surprised to see the code model being passed to MC. After all,
it assembles code, it doesn't create it.

The one place it is used is in the expansion of .cfi directives to
handle .eh_frame being more that 2gb away from the code.

As far as I can tell, gnu assembler doesn't even have an option to
enable this. Compiling a c file with gcc -mcmodel=large produces a
regular looking .eh_frame. This is probably because in practice linker
parse and recreate .eh_frames.

In llvm this is used because the JIT can place the code and .eh_frame
very far apart. Ideally we would fix the jit and delete this
option. This is hard.

Apart from confusion another problem with the current interface is
that most callers pass CodeModel::Default, which is bad since MC has
no way to map it to the target default if it actually needed to.

This patch then replaces the argument with a boolean with a default
value. The vast majority of users don't ever need to look at it. In
fact, only CodeGen and llvm-mc use it and llvm-mc just to enable more
testing.

llvm-svn: 309884
2017-08-02 20:32:26 +00:00
..
Archive.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ArchiveWriter.cpp llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Binary.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
CMakeLists.txt Bitcode: Write the irsymtab to disk. 2017-06-27 23:50:11 +00:00
COFFImportFile.cpp [llvm-dlltool] Write correct weak externals 2017-07-31 11:18:41 +00:00
COFFModuleDefinition.cpp Object: preserve more information about DEF file 2017-07-19 02:01:22 +00:00
COFFObjectFile.cpp llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Decompressor.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
ELF.cpp MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table. 2017-06-14 18:52:12 +00:00
ELFObjectFile.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Error.cpp Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
IRObjectFile.cpp Bitcode: Introduce a BitcodeFileContents data type. NFCI. 2017-06-08 22:00:24 +00:00
IRSymtab.cpp [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
LLVMBuild.txt Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MachOObjectFile.cpp [llvm] Update MachOObjectFile::exports interface 2017-07-29 00:30:45 +00:00
MachOUniversal.cpp Fix a bugs with using some Mach-O command line flags like "-arch armv7m". 2016-12-16 22:54:02 +00:00
ModuleSymbolTable.cpp Don't pass the code model to MC 2017-08-02 20:32:26 +00:00
Object.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ObjectFile.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
RecordStreamer.cpp [Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-04-24 23:21:38 +00:00
RecordStreamer.h [Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-04-24 23:21:38 +00:00
SymbolSize.cpp Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizes 2016-11-15 21:07:03 +00:00
SymbolicFile.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
WasmObjectFile.cpp [WebAssembly] Expose the offset of each data segment 2017-07-12 00:24:54 +00:00
WindowsResource.cpp Revert "Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""" 2017-07-08 03:06:10 +00:00