// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -O1 -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=O1
// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -O0 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=O0
//
// Ensure that we place appropriate lifetime markers around indirectly returned
// temporaries, and that the lifetime.ends appear in a timely manner.
//
// -O1 is used so lifetime markers actually get emitted and optnone is added
// to avoid elimination of lifetime markers by optimizations.
;
;
// CHECK-LABEL: define dso_local void @bar
;
// Be sure that we're placing the lifetime.end so that all paths go through it.
// CHECK-LABEL: define dso_local void @baz