1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib/Object
Rafael Espindola abf9b1c7a5 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
ArchiveWriter.cpp llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Binary.cpp
CMakeLists.txt
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
ELF.cpp
ELFObjectFile.cpp
Error.cpp
IRObjectFile.cpp
IRSymtab.cpp [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
LLVMBuild.txt
MachOObjectFile.cpp [llvm] Update MachOObjectFile::exports interface 2017-07-29 00:30:45 +00:00
MachOUniversal.cpp
ModuleSymbolTable.cpp Don't pass the code model to MC 2017-08-02 20:32:26 +00:00
Object.cpp
ObjectFile.cpp
RecordStreamer.cpp
RecordStreamer.h
SymbolicFile.cpp
SymbolSize.cpp
WasmObjectFile.cpp
WindowsResource.cpp