summaryrefslogtreecommitdiffstats
path: root/llvm/lib/BinaryFormat/Magic.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-06-29 06:30:56 +0000
committerMartin Storsjo <martin@martin.st>2017-06-29 06:30:56 +0000
commit3fa1213004b58f737c9fa537ca7293639dcfc72f (patch)
tree7596931910ca641a6dda50e0f9c7271ec1155b60 /llvm/lib/BinaryFormat/Magic.cpp
parentda3943d6009d31092de4a9da890443328e5305d6 (diff)
downloadbcm5719-llvm-3fa1213004b58f737c9fa537ca7293639dcfc72f.tar.gz
bcm5719-llvm-3fa1213004b58f737c9fa537ca7293639dcfc72f.zip
[BinaryFormat] Identify AArch64 COFF files
Differential Revision: https://reviews.llvm.org/D34742 llvm-svn: 306647
Diffstat (limited to 'llvm/lib/BinaryFormat/Magic.cpp')
-rw-r--r--llvm/lib/BinaryFormat/Magic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/BinaryFormat/Magic.cpp b/llvm/lib/BinaryFormat/Magic.cpp
index ca4d93f99d9..5d0a71fc780 100644
--- a/llvm/lib/BinaryFormat/Magic.cpp
+++ b/llvm/lib/BinaryFormat/Magic.cpp
@@ -190,8 +190,8 @@ file_magic llvm::identify_magic(StringRef Magic) {
}
break;
- case 0x64: // x86-64 Windows.
- if (Magic[1] == char(0x86))
+ case 0x64: // x86-64 or ARM64 Windows.
+ if (Magic[1] == char(0x86) || Magic[1] == char(0xaa))
return file_magic::coff_object;
break;
OpenPOWER on IntegriCloud