diff options
| author | Yaron Keren <yaron.keren@gmail.com> | 2016-01-22 19:03:27 +0000 |
|---|---|---|
| committer | Yaron Keren <yaron.keren@gmail.com> | 2016-01-22 19:03:27 +0000 |
| commit | e94da64e65661360af4ab01ab710bd69b81ff531 (patch) | |
| tree | 1f16b79e4764f28c062073e9520f6ef24a19d11c /clang/test/Modules/Inputs | |
| parent | 59bd3014f24004efd3a35132f04e4f82c2d37cec (diff) | |
| download | bcm5719-llvm-e94da64e65661360af4ab01ab710bd69b81ff531.tar.gz bcm5719-llvm-e94da64e65661360af4ab01ab710bd69b81ff531.zip | |
Merge templated static member variables, fixes http://llvm.org/pr26179.
Patch by Vassil Vassilev!
Reviewed by Richard Smith.
llvm-svn: 258524
Diffstat (limited to 'clang/test/Modules/Inputs')
| -rw-r--r-- | clang/test/Modules/Inputs/PR26179/A.h | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/PR26179/B.h | 2 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/PR26179/basic_string.h | 14 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/PR26179/module.modulemap | 9 |
4 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR26179/A.h b/clang/test/Modules/Inputs/PR26179/A.h new file mode 100644 index 00000000000..ce95fafb4bf --- /dev/null +++ b/clang/test/Modules/Inputs/PR26179/A.h @@ -0,0 +1,4 @@ +#include "basic_string.h" +#include "B.h" + +int *p = a; diff --git a/clang/test/Modules/Inputs/PR26179/B.h b/clang/test/Modules/Inputs/PR26179/B.h new file mode 100644 index 00000000000..eb8d1c29e79 --- /dev/null +++ b/clang/test/Modules/Inputs/PR26179/B.h @@ -0,0 +1,2 @@ +#include "basic_string.h" +extern int a[5]; diff --git a/clang/test/Modules/Inputs/PR26179/basic_string.h b/clang/test/Modules/Inputs/PR26179/basic_string.h new file mode 100644 index 00000000000..afd1e0d3b34 --- /dev/null +++ b/clang/test/Modules/Inputs/PR26179/basic_string.h @@ -0,0 +1,14 @@ +#ifndef _GLIBCXX_STRING +#define _GLIBCXX_STRING 1 + +template<typename T> +struct basic_string { + static T _S_empty_rep_storage[]; +}; + +template<typename T> +T basic_string<T>::_S_empty_rep_storage[sizeof(T)]; + +extern int a[]; + +#endif diff --git a/clang/test/Modules/Inputs/PR26179/module.modulemap b/clang/test/Modules/Inputs/PR26179/module.modulemap new file mode 100644 index 00000000000..49374181d75 --- /dev/null +++ b/clang/test/Modules/Inputs/PR26179/module.modulemap @@ -0,0 +1,9 @@ +module A { + header "A.h" + export * +} + +module B { + header "B.h" + export * +} |

