diff options
author | Devang Patel <dpatel@apple.com> | 2009-02-17 22:43:44 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-02-17 22:43:44 +0000 |
commit | 4d20395a5f00f05519caf4b0308a1925fe27ebf0 (patch) | |
tree | 8b598f0c2fe229d1b90a8cdef39d21f795ebc925 /llvm/lib/Analysis | |
parent | bf30d545802efd9d3c581d24f25981393d575b2b (diff) | |
download | bcm5719-llvm-4d20395a5f00f05519caf4b0308a1925fe27ebf0.tar.gz bcm5719-llvm-4d20395a5f00f05519caf4b0308a1925fe27ebf0.zip |
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.
llvm-svn: 64834
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 10356e59fae..12bb2921f51 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -453,7 +453,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID, const std::string &Producer, bool isMain, bool isOptimized, - const char *Flags) { + const char *Flags, + unsigned RunTimeVer) { Constant *Elts[] = { GetTagConstant(dwarf::DW_TAG_compile_unit), getCastToEmpty(GetOrCreateCompileUnitAnchor()), @@ -463,7 +464,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID, GetStringConstant(Producer), ConstantInt::get(Type::Int1Ty, isMain), ConstantInt::get(Type::Int1Ty, isOptimized), - GetStringConstant(Flags) + GetStringConstant(Flags), + ConstantInt::get(Type::Int32Ty, RunTimeVer) }; Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0])); @@ -573,7 +575,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag, uint64_t OffsetInBits, unsigned Flags, DIType DerivedFrom, - DIArray Elements) { + DIArray Elements, + unsigned RuntimeLang) { Constant *Elts[] = { GetTagConstant(Tag), @@ -586,7 +589,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag, ConstantInt::get(Type::Int64Ty, OffsetInBits), ConstantInt::get(Type::Int32Ty, Flags), getCastToEmpty(DerivedFrom), - getCastToEmpty(Elements) + getCastToEmpty(Elements), + ConstantInt::get(Type::Int32Ty, RuntimeLang) }; Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0])); |