Prevent llvm.lifetime intrinsics from being emitted at -O0.

rdar://10921594

llvm-svn: 151430
This commit is contained in:
Chad Rosier 2012-02-25 02:56:13 +00:00
parent 07d37bc1ed
commit e2c4506979
1 changed files with 5 additions and 1 deletions

View File

@ -184,7 +184,11 @@ void EmitAssemblyHelper::CreatePasses() {
}
case CodeGenOptions::OnlyAlwaysInlining:
// Respect always_inline.
PMBuilder.Inliner = createAlwaysInlinerPass();
if (OptLevel == 0)
// Do not insert lifetime intrinsics at -O0.
PMBuilder.Inliner = createAlwaysInlinerPass(false);
else
PMBuilder.Inliner = createAlwaysInlinerPass();
break;
}