From 6ccba0fb6e56f86572a7f893e5fb4e4d6b5d2e50 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Sat, 5 Jun 2010 01:14:40 +0000 Subject: Preserve type info for local variables in optimized builds. llvm-gcc enabled this couple of weeks ago. llvm-svn: 105516 --- clang/lib/CodeGen/CGDebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index c9bcb1b7e04..6025e09e7a2 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1477,7 +1477,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag, llvm::DIVariable D = DebugFactory.CreateVariable(Tag, llvm::DIDescriptor(RegionStack.back()), VD->getName(), - Unit, Line, Ty); + Unit, Line, Ty, CGM.getLangOptions().Optimize); // Insert an llvm.dbg.declare into the current block. llvm::Instruction *Call = DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); -- cgit v1.2.3