Update prebuilt Clang to match Android kernel.
Bug: 132428451
Change-Id: I8f6e2cb23f381fc0c02ddea99b867e58e925e5be
diff --git a/linux-x64/clang/include/llvm/ObjectYAML/ELFYAML.h b/linux-x64/clang/include/llvm/ObjectYAML/ELFYAML.h
index 92081f0..e194e59 100644
--- a/linux-x64/clang/include/llvm/ObjectYAML/ELFYAML.h
+++ b/linux-x64/clang/include/llvm/ObjectYAML/ELFYAML.h
@@ -1,9 +1,8 @@
//===- ELFYAML.h - ELF YAMLIO implementation --------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
@@ -44,6 +43,8 @@
LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFOSABI)
// Just use 64, since it can hold 32-bit values too.
LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_EF)
+// Just use 64, since it can hold 32-bit values too.
+LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_DYNTAG)
LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_PF)
LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_SHT)
LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_REL)
@@ -68,6 +69,7 @@
ELF_ELFCLASS Class;
ELF_ELFDATA Data;
ELF_ELFOSABI OSABI;
+ llvm::yaml::Hex8 ABIVersion;
ELF_ET Type;
ELF_EM Machine;
ELF_EF Flags;
@@ -107,8 +109,14 @@
StringRef sectionNameOrType;
};
+struct DynamicEntry {
+ ELF_DYNTAG Tag;
+ llvm::yaml::Hex64 Val;
+};
+
struct Section {
enum class SectionKind {
+ Dynamic,
Group,
RawContent,
Relocation,
@@ -121,13 +129,23 @@
ELF_SHF Flags;
llvm::yaml::Hex64 Address;
StringRef Link;
- StringRef Info;
llvm::yaml::Hex64 AddressAlign;
Optional<llvm::yaml::Hex64> EntSize;
Section(SectionKind Kind) : Kind(Kind) {}
virtual ~Section();
};
+
+struct DynamicSection : Section {
+ std::vector<DynamicEntry> Entries;
+
+ DynamicSection() : Section(SectionKind::Dynamic) {}
+
+ static bool classof(const Section *S) {
+ return S->Kind == SectionKind::Dynamic;
+ }
+};
+
struct RawContentSection : Section {
yaml::BinaryRef Content;
llvm::yaml::Hex64 Size;
@@ -153,6 +171,7 @@
// Members of a group contain a flag and a list of section indices
// that are part of the group.
std::vector<SectionOrType> Members;
+ StringRef Signature; /* Info */
Group() : Section(SectionKind::Group) {}
@@ -170,6 +189,7 @@
struct RelocationSection : Section {
std::vector<Relocation> Relocations;
+ StringRef RelocatableSec; /* Info */
RelocationSection() : Section(SectionKind::Relocation) {}
@@ -214,6 +234,7 @@
} // end namespace ELFYAML
} // end namespace llvm
+LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::DynamicEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::ProgramHeader)
LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Section>)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Symbol)
@@ -297,6 +318,11 @@
};
template <>
+struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
+ static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value);
+};
+
+template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {
static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value);
};
@@ -351,6 +377,10 @@
static void mapping(IO &IO, ELFYAML::LocalGlobalWeakSymbols &Symbols);
};
+template <> struct MappingTraits<ELFYAML::DynamicEntry> {
+ static void mapping(IO &IO, ELFYAML::DynamicEntry &Rel);
+};
+
template <> struct MappingTraits<ELFYAML::Relocation> {
static void mapping(IO &IO, ELFYAML::Relocation &Rel);
};