LLVM
15.0.0git
|
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/Error.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolicFile.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/ScopedPrinter.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include "llvm/BinaryFormat/WasmRelocs.def"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "wasm-object" |
#define | VARINT7_MAX ((1 << 7) - 1) |
#define | VARINT7_MIN (-(1 << 7)) |
#define | VARUINT7_MAX (1 << 7) |
#define | VARUINT1_MAX (1) |
#define | ECase(X) |
#define | WASM_RELOC(name, value) |
Functions | |
static uint8_t | readUint8 (WasmObjectFile::ReadContext &Ctx) |
static uint32_t | readUint32 (WasmObjectFile::ReadContext &Ctx) |
static int32_t | readFloat32 (WasmObjectFile::ReadContext &Ctx) |
static int64_t | readFloat64 (WasmObjectFile::ReadContext &Ctx) |
static uint64_t | readULEB128 (WasmObjectFile::ReadContext &Ctx) |
static StringRef | readString (WasmObjectFile::ReadContext &Ctx) |
static int64_t | readLEB128 (WasmObjectFile::ReadContext &Ctx) |
static uint8_t | readVaruint1 (WasmObjectFile::ReadContext &Ctx) |
static int32_t | readVarint32 (WasmObjectFile::ReadContext &Ctx) |
static uint32_t | readVaruint32 (WasmObjectFile::ReadContext &Ctx) |
static int64_t | readVarint64 (WasmObjectFile::ReadContext &Ctx) |
static uint64_t | readVaruint64 (WasmObjectFile::ReadContext &Ctx) |
static uint8_t | readOpcode (WasmObjectFile::ReadContext &Ctx) |
static Error | readInitExpr (wasm::WasmInitExpr &Expr, WasmObjectFile::ReadContext &Ctx) |
static wasm::WasmLimits | readLimits (WasmObjectFile::ReadContext &Ctx) |
static wasm::WasmTableType | readTableType (WasmObjectFile::ReadContext &Ctx) |
static Error | readSection (WasmSection &Section, WasmObjectFile::ReadContext &Ctx, WasmSectionOrderChecker &Checker) |
#define DEBUG_TYPE "wasm-object" |
Definition at line 33 of file WasmObjectFile.cpp.
#define VARINT7_MAX ((1 << 7) - 1) |
Definition at line 65 of file WasmObjectFile.cpp.
#define VARINT7_MIN (-(1 << 7)) |
Definition at line 66 of file WasmObjectFile.cpp.
#define VARUINT1_MAX (1) |
Definition at line 68 of file WasmObjectFile.cpp.
#define VARUINT7_MAX (1 << 7) |
Definition at line 67 of file WasmObjectFile.cpp.
#define WASM_RELOC | ( | name, | |
value | |||
) |
|
static |
Definition at line 84 of file WasmObjectFile.cpp.
References memcpy(), and llvm::report_fatal_error().
|
static |
Definition at line 93 of file WasmObjectFile.cpp.
References memcpy(), and llvm::report_fatal_error().
|
static |
Definition at line 165 of file WasmObjectFile.cpp.
|
static |
Definition at line 122 of file WasmObjectFile.cpp.
References llvm::decodeSLEB128(), and llvm::report_fatal_error().
Referenced by readVarint32(), readVarint64(), and readVaruint1().
|
static |
Definition at line 239 of file WasmObjectFile.cpp.
References readVaruint32(), readVaruint64(), and llvm::wasm::WASM_LIMITS_FLAG_HAS_MAX.
Referenced by readTableType().
|
static |
Definition at line 161 of file WasmObjectFile.cpp.
References readUint8().
|
static |
Definition at line 255 of file WasmObjectFile.cpp.
References llvm::dbgs(), LLVM_DEBUG, llvm::object::parse_failed, readString(), readUint8(), readVaruint32(), llvm::ARMBuildAttrs::Section, llvm::Check::Size, llvm::Error::success(), llvm::to_string(), and llvm::wasm::WASM_SEC_CUSTOM.
|
static |
Definition at line 112 of file WasmObjectFile.cpp.
References readULEB128(), llvm::report_fatal_error(), and llvm::MCID::Return.
Referenced by readSection().
|
static |
Definition at line 248 of file WasmObjectFile.cpp.
References llvm::wasm::WasmTableType::ElemType, llvm::wasm::WasmTableType::Limits, readLimits(), and readUint8().
|
static |
Definition at line 76 of file WasmObjectFile.cpp.
References llvm::support::endian::read32le(), and llvm::report_fatal_error().
|
static |
Definition at line 70 of file WasmObjectFile.cpp.
References llvm::report_fatal_error().
Referenced by readOpcode(), readSection(), and readTableType().
|
static |
Definition at line 102 of file WasmObjectFile.cpp.
References llvm::decodeULEB128(), and llvm::report_fatal_error().
Referenced by readString(), readVaruint32(), and readVaruint64().
|
static |
Definition at line 139 of file WasmObjectFile.cpp.
References readLEB128(), and llvm::report_fatal_error().
|
static |
Definition at line 153 of file WasmObjectFile.cpp.
References readLEB128().
|
static |
Definition at line 132 of file WasmObjectFile.cpp.
References readLEB128(), llvm::report_fatal_error(), and VARUINT1_MAX.
|
static |
Definition at line 146 of file WasmObjectFile.cpp.
References readULEB128(), and llvm::report_fatal_error().
Referenced by readLimits(), and readSection().
|
static |
Definition at line 157 of file WasmObjectFile.cpp.
References readULEB128().
Referenced by readLimits().