[cfe-commits] r70618 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Chris Lattner
sabre at nondot.org
Fri May 1 18:13:16 PDT 2009
Author: lattner
Date: Fri May 1 20:13:16 2009
New Revision: 70618
URL: http://llvm.org/viewvc/llvm-project?rev=70618&view=rev
Log:
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
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=70618&r1=70617&r2=70618&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri May 1 20:13:16 2009
@@ -383,6 +383,8 @@
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 @@
// 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 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.
More information about the cfe-commits
mailing list