Call the correct function name. Patch from Stephane Letz.

llvm-svn: 37614
This commit is contained in:
Nick Lewycky 2007-06-16 16:17:35 +00:00
parent 3a51c854d0
commit 7aa84fe7c5
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,7 @@
; RUN: llvm-as < %s | llvm2cpp -funcname=WAKKA | not grep makeLLVMModule
; PR1515
define void @foo() {
ret void
}

View File

@ -1690,7 +1690,7 @@ void CppWriter::printProgram(
Out << "using namespace llvm;\n\n";
Out << "Module* " << fname << "();\n\n";
Out << "int main(int argc, char**argv) {\n";
Out << " Module* Mod = makeLLVMModule();\n";
Out << " Module* Mod = " << fname << "();\n";
Out << " verifyModule(*Mod, PrintMessageAction);\n";
Out << " std::cerr.flush();\n";
Out << " std::cout.flush();\n";