summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Path.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-11-30 16:49:11 +0000
committerDerek Schuff <dschuff@google.com>2016-11-30 16:49:11 +0000
commit2c6f75ddc51f486f17c07f6215bca0848d3d84fe (patch)
tree64c836a6a2a1bedaf6dba6fbca891a581b6c8a6b /llvm/lib/Support/Path.cpp
parent288c088c177f0a9a994d37b3d7006c2c99f3df57 (diff)
downloadbcm5719-llvm-2c6f75ddc51f486f17c07f6215bca0848d3d84fe.tar.gz
bcm5719-llvm-2c6f75ddc51f486f17c07f6215bca0848d3d84fe.zip
[WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary support across all llvm tools. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D26172 llvm-svn: 288251
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r--llvm/lib/Support/Path.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp
index c3a6aa48a97..0616d05aff5 100644
--- a/llvm/lib/Support/Path.cpp
+++ b/llvm/lib/Support/Path.cpp
@@ -1010,6 +1010,8 @@ file_magic identify_magic(StringRef Magic) {
// 0x0000 = COFF unknown machine type
if (Magic[1] == 0)
return file_magic::coff_object;
+ if (startswith(Magic, "\0asm"))
+ return file_magic::wasm_object;
break;
}
case 0xDE: // 0x0B17C0DE = BC wraper
OpenPOWER on IntegriCloud