diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-02-25 02:56:13 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-02-25 02:56:13 +0000 |
commit | e2c4506979ed66549656a521e017881e506fb2c3 (patch) | |
tree | 544ae86a3fb57e4083033add587957cb1ef007b7 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 07d37bc1edafcf53ffc334ec0a35236e636471dc (diff) | |
download | bcm5719-llvm-e2c4506979ed66549656a521e017881e506fb2c3.tar.gz bcm5719-llvm-e2c4506979ed66549656a521e017881e506fb2c3.zip |
Prevent llvm.lifetime intrinsics from being emitted at -O0.
rdar://10921594
llvm-svn: 151430
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index e2447340c11..d175bd5e083 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -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; } |