diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-05-02 01:13:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-05-02 01:13:16 +0000 |
| commit | c6ad258a6b6c2de5250eaa8966f21b67c25ebeda (patch) | |
| tree | dbe3e1cdc020d4e47b90fa13f8415b30b1fcaf51 /clang | |
| parent | 44f3ea733923690c276d16a9a85c2317cc14fc4b (diff) | |
| download | bcm5719-llvm-c6ad258a6b6c2de5250eaa8966f21b67c25ebeda.tar.gz bcm5719-llvm-c6ad258a6b6c2de5250eaa8966f21b67c25ebeda.zip | |
When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct. rdar://6848435
llvm-svn: 70618
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index ce06a620034..ac1616b933d 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -383,6 +383,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, unsigned Line = PLoc.isInvalid() ? 0 : PLoc.getLine(); + unsigned RuntimeLang = DefUnit.getRunTimeVersion(); + // To handle recursive interface, we // first generate a debug descriptor for the struct as a forward declaration. // Then (if it is a definition) we go through and get debug info for all of @@ -391,7 +393,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, // uses of the forward declaration with the final definition. llvm::DIType FwdDecl = DebugFactory.CreateCompositeType(Tag, Unit, Name, DefUnit, Line, 0, 0, 0, 0, - llvm::DIType(), llvm::DIArray()); + llvm::DIType(), llvm::DIArray(), + RuntimeLang); // If this is just a forward declaration, return it. if (Decl->isForwardDecl()) @@ -478,7 +481,8 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, llvm::DIType RealDecl = DebugFactory.CreateCompositeType(Tag, Unit, Name, DefUnit, Line, Size, - Align, 0, 0, llvm::DIType(), Elements); + Align, 0, 0, llvm::DIType(), Elements, + RuntimeLang); // Now that we have a real decl for the struct, replace anything using the // old decl with the new one. This will recursively update the debug info. |

