Emit conversion functions correctly.

llvm-svn: 79985
This commit is contained in:
Anders Carlsson 2009-08-25 13:14:46 +00:00
parent 10ebe78730
commit 6c0a6e490c
2 changed files with 10 additions and 0 deletions

View File

@ -1634,6 +1634,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
return;
switch (D->getKind()) {
case Decl::CXXConversion:
case Decl::CXXMethod:
case Decl::Function:
// Skip function templates

View File

@ -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;
}