From d40dd64ff09af6f9dab68943492322015b61b24f Mon Sep 17 00:00:00 2001 From: Eric Beckmann Date: Thu, 29 Jun 2017 00:17:26 +0000 Subject: Revert "Replace trivial use of external rc.exe by writing our own .res file." This reverts commit d4c7e9fc63c10dbab0c30186ef8575474a704496. This is done in order to address the failure of CrWinClangLLD etc. bots. These throw an error of "side-by-side configuration is incorrect" during compilation, which sounds suspiciously related to these manifest changes. Revert "Switch external cvtres.exe for llvm's own resource library." This reverts commit 71fe8ef283a9dab9a3f21432c98466cbc23990d1. llvm-svn: 306618 --- llvm/lib/BinaryFormat/Magic.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/BinaryFormat/Magic.cpp') diff --git a/llvm/lib/BinaryFormat/Magic.cpp b/llvm/lib/BinaryFormat/Magic.cpp index f24f22c88a8..ca4d93f99d9 100644 --- a/llvm/lib/BinaryFormat/Magic.cpp +++ b/llvm/lib/BinaryFormat/Magic.cpp @@ -51,8 +51,7 @@ file_magic llvm::identify_magic(StringRef Magic) { return file_magic::coff_import_library; } // Windows resource file - if (Magic.size() >= sizeof(COFF::WinResMagic) && - memcmp(Magic.data(), COFF::WinResMagic, sizeof(COFF::WinResMagic)) == 0) + if (startswith(Magic, "\0\0\0\0\x20\0\0\0\xFF")) return file_magic::windows_resource; // 0x0000 = COFF unknown machine type if (Magic[1] == 0) -- cgit v1.2.3