[cfe-commits] r77854 - in /cfe/trunk: lib/CodeGen/CGStmt.cpp test/CodeGen/asm-inout.c
Anders Carlsson
andersca at mac.com
Sat Aug 1 20:40:34 PDT 2009
Author: andersca
Date: Sat Aug 1 22:40:19 2009
New Revision: 77854
URL: http://llvm.org/viewvc/llvm-project?rev=77854&view=rev
Log:
Don't evaluate inout constraints twice. Fixes PR3800.
Added:
cfe/trunk/test/CodeGen/asm-inout.c
Modified:
cfe/trunk/lib/CodeGen/CGStmt.cpp
Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=77854&r1=77853&r2=77854&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sat Aug 1 22:40:19 2009
@@ -917,8 +917,8 @@
else
InOutConstraints += OutputConstraint;
- InOutArgTypes.push_back(Arg->getType());
- InOutArgs.push_back(Arg);
+ InOutArgTypes.push_back(Dest.getAddress()->getType());
+ InOutArgs.push_back(Dest.getAddress());
}
}
Added: cfe/trunk/test/CodeGen/asm-inout.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm-inout.c?rev=77854&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/asm-inout.c (added)
+++ cfe/trunk/test/CodeGen/asm-inout.c Sat Aug 1 22:40:19 2009
@@ -0,0 +1,8 @@
+// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm %s -o %t &&
+// RUN: grep "load i8\*\*\* %p.addr" %t | count 1
+
+// PR3800
+void f(void **p)
+{
+ __asm__ volatile("" :"+m"(*p));
+}
More information about the cfe-commits
mailing list