summaryrefslogtreecommitdiffstats
path: root/test/cc-gnu.c
Commit message (Collapse)AuthorAgeFilesLines
* castxml: Allow --castxml-cc-<id> to detect C language settingsBrad King2015-09-181-1/+8
| | | | | | If the "<id>" is "gnu-c" or "msvc-c" then run the given compiler command line on a C source file instead of C++. This allows C language settings of the given compiler to be detected.
* test: Use more realistic macros in --castxml-cc-<id> casesBrad King2015-09-181-2/+3
| | | | | Define some of the compiler-identifying macros actually defined by GNU and MSVC compilers.
* test: Add cases covering --castxml-cc-<id> target triple detectionBrad King2015-05-281-1/+8
| | | | | Add test cases for the changes in commit 3c777ef360 (Detect: Improve target triple selection, 2015-04-16).
* Detect: Drop detected predefined macros starting in '__has'Brad King2015-02-041-0/+4
| | | | | These macros are builtin to Clang so we should not try to use any such definitions detected from the compiler.
* Detect: Use Clang builtin include dir even with --castxml-cc-<id>Brad King2015-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We need implementation-provided headers to come from Clang to match what is really built in to the parser. When not using --castxml-cc-<id>, the Clang driver adds its builtin include directory in methods like Linux::AddClangSystemIncludeArgs MSVCToolChain::AddClangSystemIncludeArgs CrossWindowsToolChain::AddClangSystemIncludeArgs (see lib/Driver/*ToolChain*.cpp). When using --castxml-cc-<id>, we must add the Clang builtin include dir in the appropriate place. GNU-like compilers should have a builtin include directory too, providing files like <emmintrin.h>. The Clang driver does not add this directory from GCC toolchains and instead adds its own builtin include directory. In this case, replace the detected compiler builtin include directory with ours. MSVC-like compilers have no separate builtin include directory. The Clang driver simply places its own builtin include direcory before the system include directory read from the INCLUDE environment variable. In this case, do the same.
* test: Add cases for --castxml-cc-(gnu|msvc) detectionBrad King2014-04-161-0/+15
Create dummy gnu-like and msvc-like compiler binaries. Use them with the --castxml-cc-<id> options to verify that the preprocessor definitions and include directories are detected as expected.