LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1517 - llvm2cpp generates incorrect code
Summary: llvm2cpp generates incorrect code
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm2cpp (show other bugs)
Version: 1.0
Hardware: All All
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2007-06-16 11:31 PDT by Stephane Letz
Modified: 2010-02-22 12:53 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Letz 2007-06-16 11:31:24 PDT
#include <stdio.h>

extern "C" void NewMarker1()
{
	printf("NewMarker1 \n");
	printf("NewMarker1 \n");
}

llvm2cpp  -f  -gen-function -funcname=makeNewMarker1 -for=NewMarker1 test.bc -o substitute_bug. 
test.cpp  produces
Comment 1 Stephane Letz 2007-06-16 11:33:34 PDT
Sorry for incorrect submit:

#include <stdio.h>

extern "C" void NewMarker1()
{
	printf("NewMarker1 \n");
	printf("NewMarker1 \n");
}

llvm2cpp  -f  -gen-function -funcname=makeNewMarker1 -for=NewMarker1 test.bc -o test.bc.cpp 
produces twice a same function in the resulting code.
Comment 2 Reid Spencer 2007-06-16 15:49:49 PDT
Fixed with this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070611/050541.html