mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
member functions. Paired commit with CFE. rdar://problem/15356637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -415,10 +415,13 @@ namespace llvm {
|
||||
StringRef UniqueIdentifier = StringRef());
|
||||
|
||||
/// createSubroutineType - Create subroutine type.
|
||||
/// @param File File in which this subroutine is defined.
|
||||
/// @param ParameterTypes An array of subroutine parameter types. This
|
||||
/// includes return type at 0th index.
|
||||
DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes);
|
||||
/// @param File File in which this subroutine is defined.
|
||||
/// @param ParameterTypes An array of subroutine parameter types. This
|
||||
/// includes return type at 0th index.
|
||||
/// @param Flags E.g.: LValueReference.
|
||||
/// These flags are used to emit dwarf attributes.
|
||||
DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes,
|
||||
unsigned Flags = 0);
|
||||
|
||||
/// createArtificialType - Create a new DIType with "artificial" flag set.
|
||||
DIType createArtificialType(DIType Ty);
|
||||
|
@@ -64,20 +64,22 @@ class DIDescriptor {
|
||||
|
||||
public:
|
||||
enum {
|
||||
FlagPrivate = 1 << 0,
|
||||
FlagProtected = 1 << 1,
|
||||
FlagFwdDecl = 1 << 2,
|
||||
FlagAppleBlock = 1 << 3,
|
||||
FlagBlockByrefStruct = 1 << 4,
|
||||
FlagVirtual = 1 << 5,
|
||||
FlagArtificial = 1 << 6,
|
||||
FlagExplicit = 1 << 7,
|
||||
FlagPrototyped = 1 << 8,
|
||||
FlagPrivate = 1 << 0,
|
||||
FlagProtected = 1 << 1,
|
||||
FlagFwdDecl = 1 << 2,
|
||||
FlagAppleBlock = 1 << 3,
|
||||
FlagBlockByrefStruct = 1 << 4,
|
||||
FlagVirtual = 1 << 5,
|
||||
FlagArtificial = 1 << 6,
|
||||
FlagExplicit = 1 << 7,
|
||||
FlagPrototyped = 1 << 8,
|
||||
FlagObjcClassComplete = 1 << 9,
|
||||
FlagObjectPointer = 1 << 10,
|
||||
FlagVector = 1 << 11,
|
||||
FlagStaticMember = 1 << 12,
|
||||
FlagIndirectVariable = 1 << 13
|
||||
FlagObjectPointer = 1 << 10,
|
||||
FlagVector = 1 << 11,
|
||||
FlagStaticMember = 1 << 12,
|
||||
FlagIndirectVariable = 1 << 13,
|
||||
FlagLValueReference = 1 << 14,
|
||||
FlagRValueReference = 1 << 15
|
||||
};
|
||||
|
||||
protected:
|
||||
@@ -313,6 +315,12 @@ public:
|
||||
}
|
||||
bool isVector() const { return (getFlags() & FlagVector) != 0; }
|
||||
bool isStaticMember() const { return (getFlags() & FlagStaticMember) != 0; }
|
||||
bool isLValueReference() const {
|
||||
return (getFlags() & FlagLValueReference) != 0;
|
||||
}
|
||||
bool isRValueReference() const {
|
||||
return (getFlags() & FlagRValueReference) != 0;
|
||||
}
|
||||
bool isValid() const { return DbgNode && isType(); }
|
||||
|
||||
/// replaceAllUsesWith - Replace all uses of debug info referenced by
|
||||
@@ -470,6 +478,19 @@ public:
|
||||
return (getUnsignedField(13) & FlagPrototyped) != 0;
|
||||
}
|
||||
|
||||
/// Return true if this subprogram is a C++11 reference-qualified
|
||||
/// non-static member function (void foo() &).
|
||||
unsigned isLValueReference() const {
|
||||
return (getUnsignedField(13) & FlagLValueReference) != 0;
|
||||
}
|
||||
|
||||
/// Return true if this subprogram is a C++11
|
||||
/// rvalue-reference-qualified non-static member function
|
||||
/// (void foo() &&).
|
||||
unsigned isRValueReference() const {
|
||||
return (getUnsignedField(13) & FlagRValueReference) != 0;
|
||||
}
|
||||
|
||||
unsigned isOptimized() const;
|
||||
|
||||
/// Verify - Verify that a subprogram descriptor is well formed.
|
||||
|
Reference in New Issue
Block a user