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/MC/MCDwarf.h b/linux-x64/clang/include/llvm/MC/MCDwarf.h
index 1a37aaf..70da5f7 100644
--- a/linux-x64/clang/include/llvm/MC/MCDwarf.h
+++ b/linux-x64/clang/include/llvm/MC/MCDwarf.h
@@ -41,6 +41,11 @@
class SMLoc;
class SourceMgr;
+namespace mcdwarf {
+// Emit the common part of the DWARF 5 range/locations list tables header.
+MCSymbol *emitListsTableHeaderStart(MCStreamer &S);
+} // namespace mcdwarf
+
/// Instances of this class represent the name of the dwarf .file directive and
/// its associated dwarf file number in the MC file. MCDwarfFile's are created
/// and uniqued by the MCContext class. In Dwarf 4 file numbers start from 1;
@@ -54,7 +59,7 @@
std::string Name;
// The index into the list of directory names for this file name.
- unsigned DirIndex;
+ unsigned DirIndex = 0;
/// The MD5 checksum, if there is one. Non-owning pointer to data allocated
/// in MCContext.
@@ -252,8 +257,8 @@
void setRootFile(StringRef Directory, StringRef FileName,
Optional<MD5::MD5Result> Checksum,
Optional<StringRef> Source) {
- CompilationDir = Directory;
- RootFile.Name = FileName;
+ CompilationDir = std::string(Directory);
+ RootFile.Name = std::string(FileName);
RootFile.DirIndex = 0;
RootFile.Checksum = Checksum;
RootFile.Source = Source;
@@ -325,8 +330,8 @@
void setRootFile(StringRef Directory, StringRef FileName,
Optional<MD5::MD5Result> Checksum, Optional<StringRef> Source) {
- Header.CompilationDir = Directory;
- Header.RootFile.Name = FileName;
+ Header.CompilationDir = std::string(Directory);
+ Header.RootFile.Name = std::string(FileName);
Header.RootFile.DirIndex = 0;
Header.RootFile.Checksum = Checksum;
Header.RootFile.Source = Source;
@@ -462,10 +467,12 @@
unsigned Register2;
};
std::vector<char> Values;
+ std::string Comment;
- MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V)
+ MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V,
+ StringRef Comment = "")
: Operation(Op), Label(L), Register(R), Offset(O),
- Values(V.begin(), V.end()) {
+ Values(V.begin(), V.end()), Comment(Comment) {
assert(Op != OpRegister);
}
@@ -477,9 +484,9 @@
public:
/// .cfi_def_cfa defines a rule for computing CFA as: take address from
/// Register and add Offset to it.
- static MCCFIInstruction createDefCfa(MCSymbol *L, unsigned Register,
- int Offset) {
- return MCCFIInstruction(OpDefCfa, L, Register, -Offset, "");
+ static MCCFIInstruction cfiDefCfa(MCSymbol *L, unsigned Register,
+ int Offset) {
+ return MCCFIInstruction(OpDefCfa, L, Register, Offset, "");
}
/// .cfi_def_cfa_register modifies a rule for computing CFA. From now
@@ -491,8 +498,8 @@
/// .cfi_def_cfa_offset modifies a rule for computing CFA. Register
/// remains the same, but offset is new. Note that it is the absolute offset
/// that will be added to a defined register to the compute CFA address.
- static MCCFIInstruction createDefCfaOffset(MCSymbol *L, int Offset) {
- return MCCFIInstruction(OpDefCfaOffset, L, 0, -Offset, "");
+ static MCCFIInstruction cfiDefCfaOffset(MCSymbol *L, int Offset) {
+ return MCCFIInstruction(OpDefCfaOffset, L, 0, Offset, "");
}
/// .cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but
@@ -565,8 +572,9 @@
/// .cfi_escape Allows the user to add arbitrary bytes to the unwind
/// info.
- static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals) {
- return MCCFIInstruction(OpEscape, L, 0, 0, Vals);
+ static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals,
+ StringRef Comment = "") {
+ return MCCFIInstruction(OpEscape, L, 0, 0, Vals, Comment);
}
/// A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE
@@ -601,6 +609,10 @@
assert(Operation == OpEscape);
return StringRef(&Values[0], Values.size());
}
+
+ StringRef getComment() const {
+ return Comment;
+ }
};
struct MCDwarfFrameInfo {
@@ -629,7 +641,8 @@
static void Emit(MCObjectStreamer &streamer, MCAsmBackend *MAB, bool isEH);
static void EmitAdvanceLoc(MCObjectStreamer &Streamer, uint64_t AddrDelta);
static void EncodeAdvanceLoc(MCContext &Context, uint64_t AddrDelta,
- raw_ostream &OS);
+ raw_ostream &OS, uint32_t *Offset = nullptr,
+ uint32_t *Size = nullptr);
};
} // end namespace llvm