From 2c6f75ddc51f486f17c07f6215bca0848d3d84fe Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Wed, 30 Nov 2016 16:49:11 +0000 Subject: [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 --- llvm/lib/Support/Path.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Support') 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 -- cgit v1.2.3