<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Generating C++ using -march=cpp generate code that does not compile"
href="https://llvm.org/bugs/show_bug.cgi?id=28491">28491</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Generating C++ using -march=cpp generate code that does not compile
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>llc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rju65@terransystems.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16719" name="attach_16719" title="this file contains the three files. Helloworld.c .ll and .cpp">attachment 16719</a> <a href="attachment.cgi?id=16719&action=edit" title="this file contains the three files. Helloworld.c .ll and .cpp">[details]</a></span>
this file contains the three files. Helloworld.c .ll and .cpp
>From what I've been able to find, I believe this is an issue. I'm just starting
to understand how to use LLVM in my own project was hoping this would help me
learn the LLVM c++ api.
The code generated for my simple Hello_world 'C' program does not compile. I've
found a reference
[<a href="http://lists.llvm.org/pipermail/llvm-dev/2016-February/095272.html">http://lists.llvm.org/pipermail/llvm-dev/2016-February/095272.html</a>] deals with
one aspect of the code generated that needs to change -
from : Value* int32_argc = args++;
to : Value* int32_argc = &*(args++); // I believe
>From searching the include path the following is in 'llvm/IR/' not as generated
in
<llvm/Analysis/Verifier.h>
the instantiation of the PassManager needs the legacy namespace prefixed.
There are other items I'm having issues with; 'PrintMessageAction' appears to
be undefined. clang wants three parameters for
ConstantExpr::getGetElementPtr(gvar_array__str, const_ptr_11_indices);
I was really pleased to find out that I could create c++ code for my IR.
examples are always useful. I'm hoping this report helps.
I'm running Ubuntu 14.04. the installed version of clang 3.8.1 from LLVM
download.
Best regards
Ray</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>