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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs