diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-02 02:33:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-02 02:33:08 +0000 |
commit | 3050d9bdb84e322e122219d54aedfe2d8ef7c51c (patch) | |
tree | aa45334d5da6557cd0b92f02edff7ef0cea3af91 /clang/test/CodeGenCXX/asm.cpp | |
parent | 315d2cab27780f692537b2c9726fbecc31097bf0 (diff) | |
download | bcm5719-llvm-3050d9bdb84e322e122219d54aedfe2d8ef7c51c.tar.gz bcm5719-llvm-3050d9bdb84e322e122219d54aedfe2d8ef7c51c.zip |
Properly handle temporaries that are created in a AsmStmt.
Previously the temporaries would get destroyed before the asm call.
llvm-svn: 118001
Diffstat (limited to 'clang/test/CodeGenCXX/asm.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/asm.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/asm.cpp b/clang/test/CodeGenCXX/asm.cpp new file mode 100644 index 00000000000..3b745a7336f --- /dev/null +++ b/clang/test/CodeGenCXX/asm.cpp @@ -0,0 +1,14 @@ +// 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 +} |