[cfe-commits] r79985 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/conversion-function.cpp
Anders Carlsson
andersca at mac.com
Tue Aug 25 06:14:46 PDT 2009
Author: andersca
Date: Tue Aug 25 08:14:46 2009
New Revision: 79985
URL: http://llvm.org/viewvc/llvm-project?rev=79985&view=rev
Log:
Emit conversion functions correctly.
Added:
cfe/trunk/test/CodeGenCXX/conversion-function.cpp
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=79985&r1=79984&r2=79985&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Aug 25 08:14:46 2009
@@ -1634,6 +1634,7 @@
return;
switch (D->getKind()) {
+ case Decl::CXXConversion:
case Decl::CXXMethod:
case Decl::Function:
// Skip function templates
Added: cfe/trunk/test/CodeGenCXX/conversion-function.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/conversion-function.cpp?rev=79985&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/conversion-function.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/conversion-function.cpp Tue Aug 25 08:14:46 2009
@@ -0,0 +1,9 @@
+// RUN: clang-cc %s -emit-llvm -o %t &&
+struct S {
+ operator int();
+};
+
+// RUN: grep "_ZN1ScviEv" %t
+S::operator int() {
+ return 10;
+}
More information about the cfe-commits
mailing list