Update prebuilt Clang to r365631c1 from Android.
The version we had was segfaulting.
Bug: 132420445
Change-Id: Icb45a6fe0b4e2166f7895e669df1157cec9fb4e0
diff --git a/linux-x64/clang/include/llvm/BinaryFormat/Wasm.h b/linux-x64/clang/include/llvm/BinaryFormat/Wasm.h
index 51f6ab2..0ff52cb 100644
--- a/linux-x64/clang/include/llvm/BinaryFormat/Wasm.h
+++ b/linux-x64/clang/include/llvm/BinaryFormat/Wasm.h
@@ -48,6 +48,11 @@
std::vector<std::pair<std::string, std::string>> SDKs;
};
+struct WasmFeatureEntry {
+ uint8_t Prefix;
+ std::string Name;
+};
+
struct WasmExport {
StringRef Name;
uint8_t Kind;
@@ -131,12 +136,13 @@
};
struct WasmDataSegment {
- uint32_t MemoryIndex;
- WasmInitExpr Offset;
+ uint32_t InitFlags;
+ uint32_t MemoryIndex; // present if InitFlags & WASM_SEGMENT_HAS_MEMINDEX
+ WasmInitExpr Offset; // present if InitFlags & WASM_SEGMENT_IS_PASSIVE == 0
ArrayRef<uint8_t> Content;
StringRef Name; // from the "segment info" section
uint32_t Alignment;
- uint32_t Flags;
+ uint32_t LinkerFlags;
uint32_t Comdat; // from the "comdat info" section
};
@@ -235,11 +241,17 @@
// Opcodes used in initializer expressions.
enum : unsigned {
WASM_OPCODE_END = 0x0b,
+ WASM_OPCODE_CALL = 0x10,
WASM_OPCODE_GLOBAL_GET = 0x23,
+ WASM_OPCODE_I32_STORE = 0x36,
WASM_OPCODE_I32_CONST = 0x41,
WASM_OPCODE_I64_CONST = 0x42,
WASM_OPCODE_F32_CONST = 0x43,
WASM_OPCODE_F64_CONST = 0x44,
+ WASM_OPCODE_I32_ADD = 0x6a,
+ WASM_OPCODE_MISC_PREFIX = 0xfc,
+ WASM_OPCODE_MEMORY_INIT = 0x08,
+ WASM_OPCODE_DATA_DROP = 0x09,
};
enum : unsigned {
@@ -247,6 +259,18 @@
WASM_LIMITS_FLAG_IS_SHARED = 0x2,
};
+enum : unsigned {
+ WASM_SEGMENT_IS_PASSIVE = 0x01,
+ WASM_SEGMENT_HAS_MEMINDEX = 0x02,
+};
+
+// Feature policy prefixes used in the custom "target_features" section
+enum : uint8_t {
+ WASM_FEATURE_PREFIX_USED = '+',
+ WASM_FEATURE_PREFIX_REQUIRED = '=',
+ WASM_FEATURE_PREFIX_DISALLOWED = '-',
+};
+
// Kind codes used in the custom "name" section
enum : unsigned {
WASM_NAMES_FUNCTION = 0x1,
@@ -343,6 +367,7 @@
std::string toString(WasmSymbolType type);
std::string relocTypetoString(uint32_t type);
+bool relocTypeHasAddend(uint32_t type);
} // end namespace wasm
} // end namespace llvm