mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Keep similar classes near each other. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186998 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59a3878c52
commit
00d92eee32
@ -174,6 +174,20 @@ namespace llvm {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// DIEnumerator - A wrapper for an enumerator (e.g. X and Y in 'enum {X,Y}').
|
||||||
|
/// FIXME: it seems strange that this doesn't have either a reference to the
|
||||||
|
/// type/precision or a file/line pair for location info.
|
||||||
|
class DIEnumerator : public DIDescriptor {
|
||||||
|
friend class DIDescriptor;
|
||||||
|
void printInternal(raw_ostream &OS) const;
|
||||||
|
public:
|
||||||
|
explicit DIEnumerator(const MDNode *N = 0) : DIDescriptor(N) {}
|
||||||
|
|
||||||
|
StringRef getName() const { return getStringField(1); }
|
||||||
|
int64_t getEnumValue() const { return getInt64Field(2); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
/// DIScope - A base class for various scopes.
|
/// DIScope - A base class for various scopes.
|
||||||
class DIScope : public DIDescriptor {
|
class DIScope : public DIDescriptor {
|
||||||
protected:
|
protected:
|
||||||
@ -189,58 +203,6 @@ namespace llvm {
|
|||||||
StringRef getDirectory() const;
|
StringRef getDirectory() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DIFile - This is a wrapper for a file.
|
|
||||||
class DIFile : public DIScope {
|
|
||||||
friend class DIDescriptor;
|
|
||||||
public:
|
|
||||||
explicit DIFile(const MDNode *N = 0) : DIScope(N) {
|
|
||||||
if (DbgNode && !isFile())
|
|
||||||
DbgNode = 0;
|
|
||||||
}
|
|
||||||
MDNode *getFileNode() const;
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DICompileUnit - A wrapper for a compile unit.
|
|
||||||
class DICompileUnit : public DIScope {
|
|
||||||
friend class DIDescriptor;
|
|
||||||
void printInternal(raw_ostream &OS) const;
|
|
||||||
public:
|
|
||||||
explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {}
|
|
||||||
|
|
||||||
unsigned getLanguage() const { return getUnsignedField(2); }
|
|
||||||
StringRef getProducer() const { return getStringField(3); }
|
|
||||||
|
|
||||||
bool isOptimized() const { return getUnsignedField(4) != 0; }
|
|
||||||
StringRef getFlags() const { return getStringField(5); }
|
|
||||||
unsigned getRunTimeVersion() const { return getUnsignedField(6); }
|
|
||||||
|
|
||||||
DIArray getEnumTypes() const;
|
|
||||||
DIArray getRetainedTypes() const;
|
|
||||||
DIArray getSubprograms() const;
|
|
||||||
DIArray getGlobalVariables() const;
|
|
||||||
DIArray getImportedEntities() const;
|
|
||||||
|
|
||||||
StringRef getSplitDebugFilename() const { return getStringField(12); }
|
|
||||||
|
|
||||||
/// Verify - Verify that a compile unit is well formed.
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DIEnumerator - A wrapper for an enumerator (e.g. X and Y in 'enum {X,Y}').
|
|
||||||
/// FIXME: it seems strange that this doesn't have either a reference to the
|
|
||||||
/// type/precision or a file/line pair for location info.
|
|
||||||
class DIEnumerator : public DIDescriptor {
|
|
||||||
friend class DIDescriptor;
|
|
||||||
void printInternal(raw_ostream &OS) const;
|
|
||||||
public:
|
|
||||||
explicit DIEnumerator(const MDNode *N = 0) : DIDescriptor(N) {}
|
|
||||||
|
|
||||||
StringRef getName() const { return getStringField(1); }
|
|
||||||
int64_t getEnumValue() const { return getInt64Field(2); }
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DIType - This is a wrapper for a type.
|
/// DIType - This is a wrapper for a type.
|
||||||
/// FIXME: Types should be factored much better so that CV qualifiers and
|
/// FIXME: Types should be factored much better so that CV qualifiers and
|
||||||
/// others do not require a huge and empty descriptor full of zeros.
|
/// others do not require a huge and empty descriptor full of zeros.
|
||||||
@ -390,42 +352,41 @@ namespace llvm {
|
|||||||
bool Verify() const;
|
bool Verify() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DITemplateTypeParameter - This is a wrapper for template type parameter.
|
/// DIFile - This is a wrapper for a file.
|
||||||
class DITemplateTypeParameter : public DIDescriptor {
|
class DIFile : public DIScope {
|
||||||
|
friend class DIDescriptor;
|
||||||
public:
|
public:
|
||||||
explicit DITemplateTypeParameter(const MDNode *N = 0) : DIDescriptor(N) {}
|
explicit DIFile(const MDNode *N = 0) : DIScope(N) {
|
||||||
|
if (DbgNode && !isFile())
|
||||||
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
DbgNode = 0;
|
||||||
StringRef getName() const { return getStringField(2); }
|
|
||||||
DIType getType() const { return getFieldAs<DIType>(3); }
|
|
||||||
StringRef getFilename() const {
|
|
||||||
return getFieldAs<DIFile>(4).getFilename();
|
|
||||||
}
|
}
|
||||||
StringRef getDirectory() const {
|
MDNode *getFileNode() const;
|
||||||
return getFieldAs<DIFile>(4).getDirectory();
|
|
||||||
}
|
|
||||||
unsigned getLineNumber() const { return getUnsignedField(5); }
|
|
||||||
unsigned getColumnNumber() const { return getUnsignedField(6); }
|
|
||||||
bool Verify() const;
|
bool Verify() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DITemplateValueParameter - This is a wrapper for template value parameter.
|
/// DICompileUnit - A wrapper for a compile unit.
|
||||||
class DITemplateValueParameter : public DIDescriptor {
|
class DICompileUnit : public DIScope {
|
||||||
|
friend class DIDescriptor;
|
||||||
|
void printInternal(raw_ostream &OS) const;
|
||||||
public:
|
public:
|
||||||
explicit DITemplateValueParameter(const MDNode *N = 0) : DIDescriptor(N) {}
|
explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {}
|
||||||
|
|
||||||
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
unsigned getLanguage() const { return getUnsignedField(2); }
|
||||||
StringRef getName() const { return getStringField(2); }
|
StringRef getProducer() const { return getStringField(3); }
|
||||||
DIType getType() const { return getFieldAs<DIType>(3); }
|
|
||||||
Value *getValue() const;
|
bool isOptimized() const { return getUnsignedField(4) != 0; }
|
||||||
StringRef getFilename() const {
|
StringRef getFlags() const { return getStringField(5); }
|
||||||
return getFieldAs<DIFile>(5).getFilename();
|
unsigned getRunTimeVersion() const { return getUnsignedField(6); }
|
||||||
}
|
|
||||||
StringRef getDirectory() const {
|
DIArray getEnumTypes() const;
|
||||||
return getFieldAs<DIFile>(5).getDirectory();
|
DIArray getRetainedTypes() const;
|
||||||
}
|
DIArray getSubprograms() const;
|
||||||
unsigned getLineNumber() const { return getUnsignedField(6); }
|
DIArray getGlobalVariables() const;
|
||||||
unsigned getColumnNumber() const { return getUnsignedField(7); }
|
DIArray getImportedEntities() const;
|
||||||
|
|
||||||
|
StringRef getSplitDebugFilename() const { return getStringField(12); }
|
||||||
|
|
||||||
|
/// Verify - Verify that a compile unit is well formed.
|
||||||
bool Verify() const;
|
bool Verify() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -505,6 +466,83 @@ namespace llvm {
|
|||||||
unsigned getScopeLineNumber() const { return getUnsignedField(19); }
|
unsigned getScopeLineNumber() const { return getUnsignedField(19); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// DILexicalBlock - This is a wrapper for a lexical block.
|
||||||
|
class DILexicalBlock : public DIScope {
|
||||||
|
public:
|
||||||
|
explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {}
|
||||||
|
DIScope getContext() const { return getFieldAs<DIScope>(2); }
|
||||||
|
unsigned getLineNumber() const { return getUnsignedField(3); }
|
||||||
|
unsigned getColumnNumber() const { return getUnsignedField(4); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// DILexicalBlockFile - This is a wrapper for a lexical block with
|
||||||
|
/// a filename change.
|
||||||
|
class DILexicalBlockFile : public DIScope {
|
||||||
|
public:
|
||||||
|
explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {}
|
||||||
|
DIScope getContext() const {
|
||||||
|
if (getScope().isSubprogram())
|
||||||
|
return getScope();
|
||||||
|
return getScope().getContext();
|
||||||
|
}
|
||||||
|
unsigned getLineNumber() const { return getScope().getLineNumber(); }
|
||||||
|
unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
|
||||||
|
DILexicalBlock getScope() const { return getFieldAs<DILexicalBlock>(2); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// DINameSpace - A wrapper for a C++ style name space.
|
||||||
|
class DINameSpace : public DIScope {
|
||||||
|
friend class DIDescriptor;
|
||||||
|
void printInternal(raw_ostream &OS) const;
|
||||||
|
public:
|
||||||
|
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
|
||||||
|
DIScope getContext() const { return getFieldAs<DIScope>(2); }
|
||||||
|
StringRef getName() const { return getStringField(3); }
|
||||||
|
unsigned getLineNumber() const { return getUnsignedField(4); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// DITemplateTypeParameter - This is a wrapper for template type parameter.
|
||||||
|
class DITemplateTypeParameter : public DIDescriptor {
|
||||||
|
public:
|
||||||
|
explicit DITemplateTypeParameter(const MDNode *N = 0) : DIDescriptor(N) {}
|
||||||
|
|
||||||
|
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
||||||
|
StringRef getName() const { return getStringField(2); }
|
||||||
|
DIType getType() const { return getFieldAs<DIType>(3); }
|
||||||
|
StringRef getFilename() const {
|
||||||
|
return getFieldAs<DIFile>(4).getFilename();
|
||||||
|
}
|
||||||
|
StringRef getDirectory() const {
|
||||||
|
return getFieldAs<DIFile>(4).getDirectory();
|
||||||
|
}
|
||||||
|
unsigned getLineNumber() const { return getUnsignedField(5); }
|
||||||
|
unsigned getColumnNumber() const { return getUnsignedField(6); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// DITemplateValueParameter - This is a wrapper for template value parameter.
|
||||||
|
class DITemplateValueParameter : public DIDescriptor {
|
||||||
|
public:
|
||||||
|
explicit DITemplateValueParameter(const MDNode *N = 0) : DIDescriptor(N) {}
|
||||||
|
|
||||||
|
DIScope getContext() const { return getFieldAs<DIScope>(1); }
|
||||||
|
StringRef getName() const { return getStringField(2); }
|
||||||
|
DIType getType() const { return getFieldAs<DIType>(3); }
|
||||||
|
Value *getValue() const;
|
||||||
|
StringRef getFilename() const {
|
||||||
|
return getFieldAs<DIFile>(5).getFilename();
|
||||||
|
}
|
||||||
|
StringRef getDirectory() const {
|
||||||
|
return getFieldAs<DIFile>(5).getDirectory();
|
||||||
|
}
|
||||||
|
unsigned getLineNumber() const { return getUnsignedField(6); }
|
||||||
|
unsigned getColumnNumber() const { return getUnsignedField(7); }
|
||||||
|
bool Verify() const;
|
||||||
|
};
|
||||||
|
|
||||||
/// DIGlobalVariable - This is a wrapper for a global variable.
|
/// DIGlobalVariable - This is a wrapper for a global variable.
|
||||||
class DIGlobalVariable : public DIDescriptor {
|
class DIGlobalVariable : public DIDescriptor {
|
||||||
friend class DIDescriptor;
|
friend class DIDescriptor;
|
||||||
@ -604,44 +642,6 @@ namespace llvm {
|
|||||||
void printExtendedName(raw_ostream &OS) const;
|
void printExtendedName(raw_ostream &OS) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DILexicalBlock - This is a wrapper for a lexical block.
|
|
||||||
class DILexicalBlock : public DIScope {
|
|
||||||
public:
|
|
||||||
explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {}
|
|
||||||
DIScope getContext() const { return getFieldAs<DIScope>(2); }
|
|
||||||
unsigned getLineNumber() const { return getUnsignedField(3); }
|
|
||||||
unsigned getColumnNumber() const { return getUnsignedField(4); }
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DILexicalBlockFile - This is a wrapper for a lexical block with
|
|
||||||
/// a filename change.
|
|
||||||
class DILexicalBlockFile : public DIScope {
|
|
||||||
public:
|
|
||||||
explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {}
|
|
||||||
DIScope getContext() const {
|
|
||||||
if (getScope().isSubprogram())
|
|
||||||
return getScope();
|
|
||||||
return getScope().getContext();
|
|
||||||
}
|
|
||||||
unsigned getLineNumber() const { return getScope().getLineNumber(); }
|
|
||||||
unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
|
|
||||||
DILexicalBlock getScope() const { return getFieldAs<DILexicalBlock>(2); }
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DINameSpace - A wrapper for a C++ style name space.
|
|
||||||
class DINameSpace : public DIScope {
|
|
||||||
friend class DIDescriptor;
|
|
||||||
void printInternal(raw_ostream &OS) const;
|
|
||||||
public:
|
|
||||||
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
|
|
||||||
DIScope getContext() const { return getFieldAs<DIScope>(2); }
|
|
||||||
StringRef getName() const { return getStringField(3); }
|
|
||||||
unsigned getLineNumber() const { return getUnsignedField(4); }
|
|
||||||
bool Verify() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// DILocation - This object holds location information. This object
|
/// DILocation - This object holds location information. This object
|
||||||
/// is not associated with any DWARF tag.
|
/// is not associated with any DWARF tag.
|
||||||
class DILocation : public DIDescriptor {
|
class DILocation : public DIDescriptor {
|
||||||
|
Loading…
Reference in New Issue
Block a user