[LLVMbugs] [Bug 21215] New: Include path argument should be redundant if -fmodule-map-file is specified
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 8 14:51:01 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21215
Bug ID: 21215
Summary: Include path argument should be redundant if
-fmodule-map-file is specified
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Modules
Assignee: unassignedclangbugs at nondot.org
Reporter: steveire at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
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;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141008/75dc7f96/attachment.html>
More information about the llvm-bugs
mailing list