diff options
author | Rui Ueyama <ruiu@google.com> | 2016-11-15 00:54:54 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-11-15 00:54:54 +0000 |
commit | 2d02166b430737a7ca910bfe72946b4119673da2 (patch) | |
tree | 0d5a50c0cbed9d402c16a176e328bca5472a7f78 /llvm/lib/Object/ObjectFile.cpp | |
parent | 07a6ae96fb0b309845ff0664b5b4aa21f7eb5327 (diff) | |
download | bcm5719-llvm-2d02166b430737a7ca910bfe72946b4119673da2.tar.gz bcm5719-llvm-2d02166b430737a7ca910bfe72946b4119673da2.zip |
Add a file magic for CL.exe's object file created with /GL.
This patch makes it possible to identify object files created by CL.exe
with /GL option. Such file contains Microsoft proprietary intermediate
code instead of target machine code to do LTO.
I need this to print out user-friendly error message from LLD.
Differential Revision: https://reviews.llvm.org/D26645
llvm-svn: 286919
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ObjectFile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index bd50773417c..996463d6728 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/lib/Object/ObjectFile.cpp @@ -78,6 +78,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, sys::fs::file_magic Type) { switch (Type) { case sys::fs::file_magic::unknown: case sys::fs::file_magic::bitcode: + case sys::fs::file_magic::coff_cl_gl_object: case sys::fs::file_magic::archive: case sys::fs::file_magic::macho_universal_binary: case sys::fs::file_magic::windows_resource: |