Preserve type info for local variables in optimized builds.

llvm-gcc enabled this couple of weeks ago.

llvm-svn: 105516
This commit is contained in:
Devang Patel 2010-06-05 01:14:40 +00:00
parent 81ef35b3ca
commit 6ccba0fb6e
1 changed files with 1 additions and 1 deletions

View File

@ -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());