<html>
<head>
<base href="http://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 --- - Include path argument should be redundant if -fmodule-map-file is specified"
href="http://llvm.org/bugs/show_bug.cgi?id=21215">21215</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Include path argument should be redundant if -fmodule-map-file is specified
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>Modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>steveire@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The module-map-file, if specified, specifies the location of header files which
might be searched for. Currently an additional -I include/path must be
redundantly specified:
$ cat test.cpp
#include "foo.h"
int main(int, char **) {
return 0;
}
$ clang++ -E -fmodules -fmodule-map-file=include/foo.map test.cpp
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2
test.cpp:2:10: fatal error: 'foo.h' file not found
#include "foo.h"
^
int main(int, char **) {
return 0;
}
1 error generated.
$ cat include/foo.map
module foo {
requires cplusplus
header "foo.h"
}
$ clang++ -E -fmodules -fmodule-map-file=include/foo.map -I include test.cpp
# 1 "test.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 318 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "test.cpp" 2
@import foo; /* clang -E: implicit import for
"/home/stephen/safe/dev/playground/modules/modulestry/include/foo.h" */
int main(int, char **) {
return 0;
}</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>