You've already forked llvm-project
mirror of
https://github.com/encounter/llvm-project.git
synced 2026-03-30 11:27:19 -07:00
3050d9bdb8
Previously the temporaries would get destroyed before the asm call. llvm-svn: 118001
15 lines
250 B
C++
15 lines
250 B
C++
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
|
|
|
struct A
|
|
{
|
|
~A();
|
|
};
|
|
int foo(A);
|
|
|
|
void bar(A &a)
|
|
{
|
|
// CHECK: call void asm
|
|
asm("" : : "r"(foo(a)) ); // rdar://8540491
|
|
// CHECK: call void @_ZN1AD1Ev
|
|
}
|