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/Function.h b/linux-x64/clang/include/llvm/IR/Function.h
index 7184cb4..7fa61e1 100644
--- a/linux-x64/clang/include/llvm/IR/Function.h
+++ b/linux-x64/clang/include/llvm/IR/Function.h
@@ -296,15 +296,18 @@
/// Get the entry count for this function.
///
- /// Entry count is the number of times the function was executed based on
- /// pgo data.
- ProfileCount getEntryCount() const;
+ /// Entry count is the number of times the function was executed.
+ /// When AllowSynthetic is false, only pgo_data will be returned.
+ ProfileCount getEntryCount(bool AllowSynthetic = false) const;
/// Return true if the function is annotated with profile data.
///
/// Presence of entry counts from a profile run implies the function has
- /// profile annotations.
- bool hasProfileData() const { return getEntryCount().hasValue(); }
+ /// profile annotations. If IncludeSynthetic is false, only return true
+ /// when the profile data is real.
+ bool hasProfileData(bool IncludeSynthetic = false) const {
+ return getEntryCount(IncludeSynthetic).hasValue();
+ }
/// Returns the set of GUIDs that needs to be imported to the function for
/// sample PGO, to enable the same inlines as the profiled optimized binary.
@@ -398,6 +401,11 @@
return getAttributes().hasParamAttribute(ArgNo, Kind);
}
+ /// gets the specified attribute from the list of attributes.
+ Attribute getParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const {
+ return getAttributes().getParamAttr(ArgNo, Kind);
+ }
+
/// gets the attribute from the list of attributes.
Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const {
return AttributeSets.getAttribute(i, Kind);
@@ -428,6 +436,12 @@
return AttributeSets.getParamAlignment(ArgNo);
}
+ /// Extract the byval type for a parameter.
+ Type *getParamByValType(unsigned ArgNo) const {
+ Type *Ty = AttributeSets.getParamByValType(ArgNo);
+ return Ty ? Ty : (arg_begin() + ArgNo)->getType()->getPointerElementType();
+ }
+
/// Extract the number of dereferenceable bytes for a call or
/// parameter (0=unknown).
/// @param i AttributeList index, referring to a return value or argument.
@@ -550,6 +564,14 @@
addFnAttr(Attribute::Speculatable);
}
+ /// Determine if the call might deallocate memory.
+ bool doesNotFreeMemory() const {
+ return onlyReadsMemory() || hasFnAttribute(Attribute::NoFree);
+ }
+ void setDoesNotFreeMemory() {
+ addFnAttr(Attribute::NoFree);
+ }
+
/// Determine if the function is known not to recurse, directly or
/// indirectly.
bool doesNotRecurse() const {
@@ -590,12 +612,15 @@
addAttribute(AttributeList::ReturnIndex, Attribute::NoAlias);
}
+ /// Do not optimize this function (-O0).
+ bool hasOptNone() const { return hasFnAttribute(Attribute::OptimizeNone); }
+
/// Optimize this function for minimum size (-Oz).
- bool optForMinSize() const { return hasFnAttribute(Attribute::MinSize); }
+ bool hasMinSize() const { return hasFnAttribute(Attribute::MinSize); }
/// Optimize this function for size (-Os) or minimum size (-Oz).
- bool optForSize() const {
- return hasFnAttribute(Attribute::OptimizeForSize) || optForMinSize();
+ bool hasOptSize() const {
+ return hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize();
}
/// copyAttributesFrom - copy all additional attributes (those not needed to