aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2014-09-17 00:53:44 +0000
committerNick Kledzik <kledzik@apple.com>2014-09-17 00:53:44 +0000
commit2d2b254e7c40c294c67d43c847d3341baa5b9f15 (patch)
tree373afcc95466a53bcffcb27d5657ce17d92cc673 /llvm/unittests/Support/Path.cpp
parentb54bbe358ab83f04e56a36be7e28d1541246e1c6 (diff)
downloadllvm-2d2b254e7c40c294c67d43c847d3341baa5b9f15.zip
llvm-2d2b254e7c40c294c67d43c847d3341baa5b9f15.tar.gz
llvm-2d2b254e7c40c294c67d43c847d3341baa5b9f15.tar.bz2
Fix identify_magic() with mach-o stub dylibs.
The wrong value was returned and the unittest did not cover the stub dylib case. llvm-svn: 217933
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index a12e9b7..ae4c9eb 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -501,6 +501,8 @@ const char macho_dynamic_linker[] = "\xfe\xed\xfa\xce..........\x00\x07";
const char macho_bundle[] = "\xfe\xed\xfa\xce..........\x00\x08";
const char macho_dsym_companion[] = "\xfe\xed\xfa\xce..........\x00\x0a";
const char windows_resource[] = "\x00\x00\x00\x00\x020\x00\x00\x00\xff";
+const char macho_dynamically_linked_shared_lib_stub[] =
+ "\xfe\xed\xfa\xce..........\x00\x09";
TEST_F(FileSystemTest, Magic) {
struct type {
@@ -526,6 +528,7 @@ TEST_F(FileSystemTest, Magic) {
DEFINE(macho_dynamically_linked_shared_lib),
DEFINE(macho_dynamic_linker),
DEFINE(macho_bundle),
+ DEFINE(macho_dynamically_linked_shared_lib_stub),
DEFINE(macho_dsym_companion),
DEFINE(windows_resource)
#undef DEFINE