[LLVMbugs] [Bug 21214] New: clang needs to accept -fmodule-map-file multiple times

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 8 14:48:03 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21214

            Bug ID: 21214
           Summary: clang needs to accept -fmodule-map-file multiple times
           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

Currently only the last instance on the command line is consumed:

$ cat test.cpp 

#include "foo.h"
#include "bar.h"

int main(int, char **) {

  return 0;
}

$ ls include/
bar.h  bar.map  foo.h  foo.map

$ cat include/*
#pragma once

static inline int bar() { return 1; }
module bar {
  requires cplusplus
  header "bar.h"
}
#pragma once

static inline int foo() { return 1; }
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 ".../include/foo.h" */
# 1 "include/bar.h" 1


static inline int bar() { return 1; }
# 4 "test.cpp" 2

int main(int, char **) {

  return 0;
}

$ clang++ -E -fmodules -fmodule-map-file=include/foo.map
-fmodule-map-file=include/bar.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

# 1 "include/foo.h" 1


static inline int foo() { return 1; }
# 3 "test.cpp" 2
@import bar; /* clang -E: implicit import for ".../include/bar.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/39ca8477/attachment.html>


More information about the llvm-bugs mailing list