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/IR/Attributes.h b/linux-x64/clang/include/llvm/IR/Attributes.h
index 8d7f401..06cc09e 100644
--- a/linux-x64/clang/include/llvm/IR/Attributes.h
+++ b/linux-x64/clang/include/llvm/IR/Attributes.h
@@ -90,6 +90,7 @@
static Attribute get(LLVMContext &Context, AttrKind Kind, uint64_t Val = 0);
static Attribute get(LLVMContext &Context, StringRef Kind,
StringRef Val = StringRef());
+ static Attribute get(LLVMContext &Context, AttrKind Kind, Type *Ty);
/// Return a uniquified Attribute object that has the specific
/// alignment set.
@@ -102,6 +103,7 @@
static Attribute getWithAllocSizeArgs(LLVMContext &Context,
unsigned ElemSizeArg,
const Optional<unsigned> &NumElemsArg);
+ static Attribute getWithByValType(LLVMContext &Context, Type *Ty);
//===--------------------------------------------------------------------===//
// Attribute Accessors
@@ -117,6 +119,9 @@
/// attribute.
bool isStringAttribute() const;
+ /// Return true if the attribute is a type attribute.
+ bool isTypeAttribute() const;
+
/// Return true if the attribute is present.
bool hasAttribute(AttrKind Val) const;
@@ -139,6 +144,10 @@
/// attribute to be a string attribute.
StringRef getValueAsString() const;
+ /// Return the attribute's value as a Type. This requires the attribute to be
+ /// a type attribute.
+ Type *getValueAsType() const;
+
/// Returns the alignment field of an attribute as a byte alignment
/// value.
unsigned getAlignment() const;
@@ -279,6 +288,7 @@
unsigned getStackAlignment() const;
uint64_t getDereferenceableBytes() const;
uint64_t getDereferenceableOrNullBytes() const;
+ Type *getByValType() const;
std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const;
std::string getAsString(bool InAttrGrp = false) const;
@@ -598,6 +608,9 @@
/// Return the alignment for the specified function parameter.
unsigned getParamAlignment(unsigned ArgNo) const;
+ /// Return the byval type for the specified function parameter.
+ Type *getParamByValType(unsigned ArgNo) const;
+
/// Get the stack alignment.
unsigned getStackAlignment(unsigned Index) const;
@@ -697,6 +710,7 @@
uint64_t DerefBytes = 0;
uint64_t DerefOrNullBytes = 0;
uint64_t AllocSizeArgs = 0;
+ Type *ByValType = nullptr;
public:
AttrBuilder() = default;
@@ -772,6 +786,9 @@
/// dereferenceable_or_null attribute exists (zero is returned otherwise).
uint64_t getDereferenceableOrNullBytes() const { return DerefOrNullBytes; }
+ /// Retrieve the byval type.
+ Type *getByValType() const { return ByValType; }
+
/// Retrieve the allocsize args, if the allocsize attribute exists. If it
/// doesn't exist, pair(0, 0) is returned.
std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const;
@@ -796,6 +813,9 @@
AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg,
const Optional<unsigned> &NumElemsArg);
+ /// This turns a byval type into the form used internally in Attribute.
+ AttrBuilder &addByValAttr(Type *Ty);
+
/// Add an allocsize attribute, using the representation returned by
/// Attribute.getIntValue().
AttrBuilder &addAllocSizeAttrFromRawRepr(uint64_t RawAllocSizeRepr);