diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/test/Other/2007-06-16-Funcname.ll | 7 | ||||
-rw-r--r-- | llvm/tools/llvm2cpp/CppWriter.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/test/Other/2007-06-16-Funcname.ll b/llvm/test/Other/2007-06-16-Funcname.ll new file mode 100644 index 00000000000..a2cdd18d53e --- /dev/null +++ b/llvm/test/Other/2007-06-16-Funcname.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | llvm2cpp -funcname=WAKKA | not grep makeLLVMModule +; PR1515 + +define void @foo() { + ret void +} + diff --git a/llvm/tools/llvm2cpp/CppWriter.cpp b/llvm/tools/llvm2cpp/CppWriter.cpp index 86e266147c0..1076b59c021 100644 --- a/llvm/tools/llvm2cpp/CppWriter.cpp +++ b/llvm/tools/llvm2cpp/CppWriter.cpp @@ -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"; |