Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/ObjectYAML/MachOYAML.h b/linux-x64/clang/include/llvm/ObjectYAML/MachOYAML.h
index d7e1c03..94e66c5 100644
--- a/linux-x64/clang/include/llvm/ObjectYAML/MachOYAML.h
+++ b/linux-x64/clang/include/llvm/ObjectYAML/MachOYAML.h
@@ -18,6 +18,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
+#include "llvm/ObjectYAML/YAML.h"
#include "llvm/Support/YAMLTraits.h"
#include <cstdint>
#include <string>
@@ -26,6 +27,20 @@
namespace llvm {
namespace MachOYAML {
+struct Relocation {
+ // Offset in the section to what is being relocated.
+ llvm::yaml::Hex32 address;
+ // Symbol index if r_extern == 1 else section index.
+ uint32_t symbolnum;
+ bool is_pcrel;
+ // Real length = 2 ^ length.
+ uint8_t length;
+ bool is_extern;
+ uint8_t type;
+ bool is_scattered;
+ int32_t value;
+};
+
struct Section {
char sectname[16];
char segname[16];
@@ -39,6 +54,8 @@
llvm::yaml::Hex32 reserved1;
llvm::yaml::Hex32 reserved2;
llvm::yaml::Hex32 reserved3;
+ Optional<llvm::yaml::BinaryRef> content;
+ std::vector<Relocation> relocations;
};
struct FileHeader {
@@ -141,6 +158,7 @@
} // end namespace llvm
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::LoadCommand)
+LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::Relocation)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::Section)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::RebaseOpcode)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::BindOpcode)
@@ -196,8 +214,13 @@
static void mapping(IO &IO, MachOYAML::ExportEntry &ExportEntry);
};
+template <> struct MappingTraits<MachOYAML::Relocation> {
+ static void mapping(IO &IO, MachOYAML::Relocation &R);
+};
+
template <> struct MappingTraits<MachOYAML::Section> {
static void mapping(IO &IO, MachOYAML::Section &Section);
+ static std::string validate(IO &io, MachOYAML::Section &Section);
};
template <> struct MappingTraits<MachOYAML::NListEntry> {