Author: hans Date: Wed Jan 21 18:45:20 2015 New Revision: 226754 URL: http://llvm.org/viewvc/llvm-project?rev=226754&view=rev Log: Fix compiler_builtins.m test to not rely on including system stdlib.h and malloc.h
Importing _Builtin_intrinsics.sse and avx would transitively pull in those headers, and the test would fail when building in an environment where they were not available on the include path. This fixes PR20995 for me. Differential Revision: http://reviews.llvm.org/D7112 Added: cfe/trunk/test/Modules/Inputs/System/usr/include/malloc.h cfe/trunk/test/Modules/Inputs/System/usr/include/stdlib.h Modified: cfe/trunk/test/Modules/compiler_builtins.m Added: cfe/trunk/test/Modules/Inputs/System/usr/include/malloc.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/System/usr/include/malloc.h?rev=226754&view=auto ============================================================================== (empty) Added: cfe/trunk/test/Modules/Inputs/System/usr/include/stdlib.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/System/usr/include/stdlib.h?rev=226754&view=auto ============================================================================== --- cfe/trunk/test/Modules/Inputs/System/usr/include/stdlib.h (added) +++ cfe/trunk/test/Modules/Inputs/System/usr/include/stdlib.h Wed Jan 21 18:45:20 2015 @@ -0,0 +1 @@ +typedef __SIZE_TYPE__ size_t; Modified: cfe/trunk/test/Modules/compiler_builtins.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/compiler_builtins.m?rev=226754&r1=226753&r2=226754&view=diff ============================================================================== --- cfe/trunk/test/Modules/compiler_builtins.m (original) +++ cfe/trunk/test/Modules/compiler_builtins.m Wed Jan 21 18:45:20 2015 @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -Xclang -verify -// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -Xclang -verify +// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify +// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify // expected-no-diagnostics #ifdef __SSE__ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
