The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.

Add support for two additional DWARF attributes to encode Objective-C runtime version number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-02-17 22:43:44 +00:00
parent fdc40a0a69
commit 13319ceffd
6 changed files with 31 additions and 6 deletions

View File

@@ -118,9 +118,11 @@ namespace llvm {
/// code generator accepts maximum one main compile unit per module. If a
/// module does not contain any main compile unit then the code generator
/// will emit multiple compile units in the output object file.
bool isMain() const { return getUnsignedField(6); }
bool isOptimized() const { return getUnsignedField(7); }
std::string getFlags() const { return getStringField(8); }
unsigned getRunTimeVersion() const { return getUnsignedField(9); }
/// Verify - Verify that a compile unit is well formed.
bool Verify() const;
@@ -231,6 +233,7 @@ namespace llvm {
public:
explicit DICompositeType(GlobalVariable *GV);
DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
unsigned getRunTimeLang() const { return getUnsignedField(11); }
/// Verify - Verify that a composite type descriptor is well formed.
bool Verify() const;
@@ -381,7 +384,8 @@ namespace llvm {
const std::string &Producer,
bool isMain = false,
bool isOptimized = false,
const char *Flags = "");
const char *Flags = "",
unsigned RunTimeVer = 0);
/// CreateEnumerator - Create a single enumerator value.
DIEnumerator CreateEnumerator(const std::string &Name, uint64_t Val);
@@ -412,7 +416,8 @@ namespace llvm {
uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags,
DIType DerivedFrom,
DIArray Elements);
DIArray Elements,
unsigned RunTimeLang = 0);
/// CreateSubprogram - Create a new descriptor for the specified subprogram.
/// See comments in DISubprogram for descriptions of these fields.