diff options
author | Rui Ueyama <ruiu@google.com> | 2014-09-11 21:09:57 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-09-11 21:09:57 +0000 |
commit | 2acb05843b6dd1a120aede664366444f3fedcbdb (patch) | |
tree | 83048b0dc0b8012f89d141a602b549bc275152b1 /llvm/unittests/Support/Path.cpp | |
parent | 5d8f698ec194dbdb2c8c92abce02c9e82ae21b5c (diff) | |
download | llvm-2acb05843b6dd1a120aede664366444f3fedcbdb.zip llvm-2acb05843b6dd1a120aede664366444f3fedcbdb.tar.gz llvm-2acb05843b6dd1a120aede664366444f3fedcbdb.tar.bz2 |
Support: improve identify_magic to recognize COFF bigobj
identify_magic recognized a COFF bigobj as an import library file.
This patch fixes that.
llvm-svn: 217627
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r-- | llvm/unittests/Support/Path.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index d4de273..54cf96f 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -483,6 +483,8 @@ TEST_F(FileSystemTest, DirectoryIteration) { const char archive[] = "!<arch>\x0A"; const char bitcode[] = "\xde\xc0\x17\x0b"; const char coff_object[] = "\x00\x00......"; +const char coff_bigobj[] = "\x00\x00\xff\xff........" + "\xc7\xa1\xba\xd1\xee\xba\xa9\x4b\xaf\x20\xfa\xf6\x6a\xa4\xdc\xb8"; const char coff_import_library[] = "\x00\x00\xff\xff...."; const char elf_relocatable[] = { 0x7f, 'E', 'L', 'F', 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; @@ -512,6 +514,7 @@ TEST_F(FileSystemTest, Magic) { DEFINE(archive), DEFINE(bitcode), DEFINE(coff_object), + { "coff_bigobj", coff_bigobj, sizeof(coff_bigobj), fs::file_magic::coff_object }, DEFINE(coff_import_library), DEFINE(elf_relocatable), DEFINE(macho_universal_binary), |