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/IR/DIBuilder.h b/linux-x64/clang/include/llvm/IR/DIBuilder.h
index ad9a35b..e023856 100644
--- a/linux-x64/clang/include/llvm/IR/DIBuilder.h
+++ b/linux-x64/clang/include/llvm/IR/DIBuilder.h
@@ -135,6 +135,9 @@
/// profile collection.
/// \param NameTableKind Whether to emit .debug_gnu_pubnames,
/// .debug_pubnames, or no pubnames at all.
+ /// \param SysRoot The clang system root (value of -isysroot).
+ /// \param SDK The SDK name. On Darwin, this is the last component
+ /// of the sysroot.
DICompileUnit *
createCompileUnit(unsigned Lang, DIFile *File, StringRef Producer,
bool isOptimized, StringRef Flags, unsigned RV,
@@ -145,7 +148,8 @@
bool DebugInfoForProfiling = false,
DICompileUnit::DebugNameTableKind NameTableKind =
DICompileUnit::DebugNameTableKind::Default,
- bool RangesBaseAddress = false);
+ bool RangesBaseAddress = false, StringRef SysRoot = {},
+ StringRef SDK = {});
/// Create a file descriptor to hold debugging information for a file.
/// \param Filename File name.
@@ -195,6 +199,12 @@
unsigned Encoding,
DINode::DIFlags Flags = DINode::FlagZero);
+ /// Create debugging information entry for a string
+ /// type.
+ /// \param Name Type name.
+ /// \param SizeInBits Size of the type.
+ DIStringType *createStringType(StringRef Name, uint64_t SizeInBits);
+
/// Create debugging information entry for a qualified
/// type, e.g. 'const int'.
/// \param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type
@@ -237,8 +247,10 @@
/// \param File File where this type is defined.
/// \param LineNo Line number.
/// \param Context The surrounding context for the typedef.
+ /// \param AlignInBits Alignment. (optional)
DIDerivedType *createTypedef(DIType *Ty, StringRef Name, DIFile *File,
- unsigned LineNo, DIScope *Context);
+ unsigned LineNo, DIScope *Context,
+ uint32_t AlignInBits = 0);
/// Create debugging information entry for a 'friend'.
DIDerivedType *createFriend(DIType *Ty, DIType *FriendTy);
@@ -440,19 +452,22 @@
/// \param Scope Scope in which this type is defined.
/// \param Name Type parameter name.
/// \param Ty Parameter type.
- DITemplateTypeParameter *
- createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty);
+ /// \param IsDefault Parameter is default or not
+ DITemplateTypeParameter *createTemplateTypeParameter(DIScope *Scope,
+ StringRef Name,
+ DIType *Ty,
+ bool IsDefault);
/// Create debugging information for template
/// value parameter.
/// \param Scope Scope in which this type is defined.
/// \param Name Value parameter name.
/// \param Ty Parameter type.
+ /// \param IsDefault Parameter is default or not
/// \param Val Constant parameter value.
- DITemplateValueParameter *createTemplateValueParameter(DIScope *Scope,
- StringRef Name,
- DIType *Ty,
- Constant *Val);
+ DITemplateValueParameter *
+ createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty,
+ bool IsDefault, Constant *Val);
/// Create debugging information for a template template parameter.
/// \param Scope Scope in which this type is defined.
@@ -479,8 +494,24 @@
/// \param AlignInBits Alignment.
/// \param Ty Element type.
/// \param Subscripts Subscripts.
- DICompositeType *createArrayType(uint64_t Size, uint32_t AlignInBits,
- DIType *Ty, DINodeArray Subscripts);
+ /// \param DataLocation The location of the raw data of a descriptor-based
+ /// Fortran array, either a DIExpression* or
+ /// a DIVariable*.
+ /// \param Associated The associated attribute of a descriptor-based
+ /// Fortran array, either a DIExpression* or
+ /// a DIVariable*.
+ /// \param Allocated The allocated attribute of a descriptor-based
+ /// Fortran array, either a DIExpression* or
+ /// a DIVariable*.
+ /// \param Rank The rank attribute of a descriptor-based
+ /// Fortran array, either a DIExpression* or
+ /// a DIVariable*.
+ DICompositeType *createArrayType(
+ uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts,
+ PointerUnion<DIExpression *, DIVariable *> DataLocation = nullptr,
+ PointerUnion<DIExpression *, DIVariable *> Associated = nullptr,
+ PointerUnion<DIExpression *, DIVariable *> Allocated = nullptr,
+ PointerUnion<DIExpression *, DIVariable *> Rank = nullptr);
/// Create debugging information entry for a vector type.
/// \param Size Array size.
@@ -564,6 +595,14 @@
/// implicitly uniques the values returned.
DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count);
DISubrange *getOrCreateSubrange(int64_t Lo, Metadata *CountNode);
+ DISubrange *getOrCreateSubrange(Metadata *Count, Metadata *LowerBound,
+ Metadata *UpperBound, Metadata *Stride);
+
+ DIGenericSubrange *
+ getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count,
+ DIGenericSubrange::BoundType LowerBound,
+ DIGenericSubrange::BoundType UpperBound,
+ DIGenericSubrange::BoundType Stride);
/// Create a new descriptor for the specified variable.
/// \param Context Variable scope.
@@ -572,7 +611,7 @@
/// \param File File where this variable is defined.
/// \param LineNo Line number.
/// \param Ty Variable Type.
- /// \param isLocalToUnit Boolean flag indicate whether this variable is
+ /// \param IsLocalToUnit Boolean flag indicate whether this variable is
/// externally visible or not.
/// \param Expr The location of the global relative to the attached
/// GlobalVariable.
@@ -581,16 +620,16 @@
/// specified)
DIGlobalVariableExpression *createGlobalVariableExpression(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
- unsigned LineNo, DIType *Ty, bool isLocalToUnit,
+ unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined = true,
DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
- MDTuple *templateParams = nullptr, uint32_t AlignInBits = 0);
+ MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0);
/// Identical to createGlobalVariable
/// except that the resulting DbgNode is temporary and meant to be RAUWed.
DIGlobalVariable *createTempGlobalVariableFwdDecl(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
- unsigned LineNo, DIType *Ty, bool isLocalToUnit, MDNode *Decl = nullptr,
- MDTuple *templateParams = nullptr, uint32_t AlignInBits = 0);
+ unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl = nullptr,
+ MDTuple *TemplateParams= nullptr, uint32_t AlignInBits = 0);
/// Create a new descriptor for an auto variable. This is a local variable
/// that is not a subprogram parameter.
@@ -732,11 +771,19 @@
/// A space-separated shell-quoted list of -D macro
/// definitions as they would appear on a command line.
/// \param IncludePath The path to the module map file.
- /// \param ISysRoot The clang system root (value of -isysroot).
+ /// \param APINotesFile The path to an API notes file for this module.
+ /// \param File Source file of the module.
+ /// Used for Fortran modules.
+ /// \param LineNo Source line number of the module.
+ /// Used for Fortran modules.
+ /// \param IsDecl This is a module declaration; default to false;
+ /// when set to true, only Scope and Name are required
+ /// as this entry is just a hint for the debugger to find
+ /// the corresponding definition in the global scope.
DIModule *createModule(DIScope *Scope, StringRef Name,
- StringRef ConfigurationMacros,
- StringRef IncludePath,
- StringRef ISysRoot);
+ StringRef ConfigurationMacros, StringRef IncludePath,
+ StringRef APINotesFile = {}, DIFile *File = nullptr,
+ unsigned LineNo = 0, bool IsDecl = false);
/// This creates a descriptor for a lexical block with a new file
/// attached. This merely extends the existing