Commit Graph

50587 Commits

Author SHA1 Message Date
Daniel Jasper a238b17e76 Remove assert added in r201249.
This triggers on one of our internal tests.

Dmitri:
I do not understand this part of the codebase well enough to locate the
underlying cause easily. If the correct fix is not obvious, I can try to
debug the problem further or try to come up with reduced test case.

llvm-svn: 201329
2014-02-13 14:24:14 +00:00
Daniel Jasper ee107adb7d clang-format: Improve documentation of DerivePointerBinding.
For reference: llvm.org/PR18690.

Also updated generated help page and page creation script.

llvm-svn: 201323
2014-02-13 12:51:50 +00:00
NAKAMURA Takumi 8e57597830 [CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE) gave up.
llvm-svn: 201319
2014-02-13 11:24:45 +00:00
Tim Northover 1994fa7d3d ARM & AArch64 NEON: share the vabs implementation.
This changes ARM to use @llvm.fabs for floating-point vabs. Patterns
already existed in the backend, and it might help mid-end phases since
it's more likely to be understood than @llvm.arm.neon.vabs.

llvm-svn: 201313
2014-02-13 10:44:17 +00:00
Robert Lytton 9e8c1a4b57 XCore target pass -v flag to assembler & linker
llvm-svn: 201312
2014-02-13 10:40:12 +00:00
Robert Lytton 694f884f35 add comment explaining previous commit
see 'XCore target -fexceptions flag handling'

llvm-svn: 201311
2014-02-13 10:38:56 +00:00
Robert Lytton f7e03c1cff XCore target -fexceptions flag handling
XCore target has -fno-exception as the default option
Pass on "-fexceptions" flag to xcc (linker)

llvm-svn: 201310
2014-02-13 10:34:44 +00:00
Renato Golin 03d671c733 Remove spurious default case to silent sanitizer
llvm-svn: 201309
2014-02-13 10:26:33 +00:00
Renato Golin c4b4924a13 Add EXPERIMENTAL --rtlib=compiler-rt to GNU Clang
This commit is not strictly correct nor accounts for all uses (shared
objects, for example), but it allows one to test the compiler-rt library
on GNU targets.

Using this patch to run the test-suite has already shown me problems
on ARM. Since this is a Darwin-only flag, nobody is using it, so it
shouldn't be a problem.

I will need extension to deal with the shared cases, but since we're
not compiling libclang_rt.so, that's not yet applicable. Many other
problems will have to be fixed first in compiler-rt (such as removing
the 'arch' name from it and making it trully multi-arch, moving it to
the default lib directory, make both .a and .so variants, etc).

llvm-svn: 201307
2014-02-13 10:01:16 +00:00
Alexey Bataev aadd52e5cc [OPENMP] 'if' clause support (no CodeGen support)
llvm-svn: 201297
2014-02-13 05:29:23 +00:00
Aaron Ballman 44d2ed9817 There is no std namespace for standards-based attributes. Removing the scope qualifier and updating the only affected test case.
llvm-svn: 201294
2014-02-13 04:31:04 +00:00
Rafael Espindola 30b8bf7dbf Use simpler version of fs::create_directory.
llvm-svn: 201293
2014-02-13 04:22:54 +00:00
Rafael Espindola ea2519c37b Use simpler version of llvm::sys::fs::create_directories.
llvm-svn: 201290
2014-02-13 04:08:44 +00:00
Yunzhong Gao 5fd0c9d032 Fixing a compiler assertion with zero-width bit-fields in packed structs.
According to the GNU docs, zero-sized bitfields should not be affected by the
packed attribute.

Differential Revision: http://llvm-reviews.chandlerc.com/D2693

llvm-svn: 201288
2014-02-13 02:45:10 +00:00
Reid Kleckner 6eaf05a4fd Really fix unused variable warnings in CIndex.
llvm-svn: 201285
2014-02-13 01:19:59 +00:00
John McCall 76e1818a2b ms_struct layout replaces platform-specific behavior like
useBitFieldTypeAlignment() and appears to ignore the special
bit-packing semantics of __attribute__((packed)).

Further flesh out an already-extensive comment.

llvm-svn: 201282
2014-02-13 00:50:08 +00:00
John McCall 5d4d61f64f Change testcase to use FileCheck.
llvm-svn: 201281
2014-02-13 00:50:02 +00:00
Reid Kleckner a4b3b2d715 Fix uninitialized read in vtordisp pragma code.
llvm-svn: 201280
2014-02-13 00:44:34 +00:00
Reid Kleckner f50dc56baa Fix some -Wdocumentation warnings in Sema.h and try to fix test for win64
llvm-svn: 201278
2014-02-13 00:22:04 +00:00
Reid Kleckner fd48fc6d33 Silence unused variable warning in CIndex.cpp with NDEBUG
llvm-svn: 201276
2014-02-12 23:56:20 +00:00
Reid Kleckner c0dca6ded7 MS ABI: Implement #pragma vtordisp() and clang-cl /vdN
These features are new in VS 2013 and are necessary in order to layout
std::ostream correctly.  Currently we have an ABI incompatibility when
self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper
in gtest.

This change adds another implicit attribute, MSVtorDispAttr, because
implicit attributes are currently the best way to make sure the
information stays on class templates through instantiation.

Reviewers: majnemer

Differential Revision: http://llvm-reviews.chandlerc.com/D2746

llvm-svn: 201274
2014-02-12 23:50:26 +00:00
Hans Wennborg fbf3bb6cf0 Remove FIXME and hardcoded triple from this test (PR18251)
We don't support using the MS ABI with non-x86/x86_64 targets anyway.

llvm-svn: 201260
2014-02-12 21:40:46 +00:00
Benjamin Kramer c6a1a16deb Remove unused diagnostic.
llvm-svn: 201257
2014-02-12 21:25:40 +00:00
Jordan Rose 68db107c81 [examples] Use loadable modules instead of shared libraries for Clang plugins.
This avoids linking in extra copies of, say, LLVMSupport.

llvm-svn: 201256
2014-02-12 21:04:23 +00:00
David Majnemer abecae741c Sema: Restrict alignment to 2**28.
Allowing alignment past this point causes wrap around within clang.

N.B.  GCC has the same restriction.

llvm-svn: 201254
2014-02-12 20:36:10 +00:00
Reid Kleckner f06b266bfa Attributes: Avoid a big useless copy in the emitter
llvm-svn: 201251
2014-02-12 19:26:24 +00:00
Adrian Prantl 375fddcf5c relax testcase and make ppc64 buildbots happy.
llvm-svn: 201250
2014-02-12 19:26:19 +00:00
Dmitri Gribenko ea4d1c32fb libclang: report error code for bad PCH files
This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file.  This allows
the caller, for example, to rebuild the PCH file and retry the request.

There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2.  These functions
return a CXTranslationUnit indirectly and also return an error code.  Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.

As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.

llvm-svn: 201249
2014-02-12 19:12:37 +00:00
Adrian Prantl 2039d44603 Document and improve the debug-property-synth.m test based on the
information provided in the referenced radar.

llvm-svn: 201248
2014-02-12 18:24:07 +00:00
Adrian Prantl ab340334dc Revert "Remove bad debug info test."
This reverts commit r201183.
The test, albeit undocumented and badly written is still testing something
useful. It will be updated in a subsequent commit.

llvm-svn: 201247
2014-02-12 18:24:04 +00:00
Reid Kleckner f526b94858 Attributes: Emit enumerators in td file declaration order
llvm-svn: 201246
2014-02-12 18:22:18 +00:00
Daniel Sanders abe212a3b8 Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots.

llvm-svn: 201241
2014-02-12 15:39:20 +00:00
Daniel Sanders 2f235aebdb Arcanist failed to commit the two clang test corrections that should have been in r201237.
llvm-svn: 201238
2014-02-12 14:46:15 +00:00
Dmitri Gribenko 371c217b3f libclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument
llvm-svn: 201236
2014-02-12 14:17:58 +00:00
Tim Northover 26562486ad Whitespace cleanup (mostly stray tabs, a few not-quite-empty lines).
llvm-svn: 201234
2014-02-12 12:56:48 +00:00
Tim Northover 4b76291991 ARM & NEON: add test for r101232
rdar://problem/16035743

llvm-svn: 201233
2014-02-12 12:08:06 +00:00
Tim Northover 3402dc7d52 ARM NEON: fix range checking on immediates.
Previously, range checking on the __builtin_neon_XYZ_v Clang intrinsics didn't
take account of the type actually passed to the call, which meant a request
like "vext_s16(a, b, 7)" was allowed through (TableGen was conservative and
allowed 0-7 for all types). This caused an assert in the backend because the
lane doesn't make sense.

llvm-svn: 201232
2014-02-12 12:04:59 +00:00
Dmitri Gribenko e7f8cba892 Don't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c
With -fdisable-module-hash, we can implement this with a simple 'cp'.

llvm-svn: 201231
2014-02-12 11:50:37 +00:00
NAKAMURA Takumi 9218e94714 clang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32 with %/t (instead of %t).
xargs didn't handle dosish paths, while find foo\bar\ emits dosish paths.

llvm-svn: 201228
2014-02-12 11:42:12 +00:00
NAKAMURA Takumi 691e6ef461 clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish pathsep.
FIXME: It could be more simple...
llvm-svn: 201227
2014-02-12 11:42:02 +00:00
Dmitri Gribenko fdd4f30f0e 'svn add' files I forgot for r201224 (Add an option to allow Clang verify
source files for a module only once during)

llvm-svn: 201225
2014-02-12 10:40:07 +00:00
Dmitri Gribenko f430da4de6 Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from.  If any file was changed, the module is rebuilt.  There are two
problems with this:
1. correctness: we don't verify system files (there are too many of them, and
   stat'ing all of them would take a lot of time);
2. performance: the same module file is verified again and again during a
   single build.

This change allows the build system to optimize source file verification.  The
idea is based on the fact that while the project is being built, the source
files don't change.  This allows us to verify the module only once during a
single build session.  The build system passes a flag,
-fbuild-session-timestamp=, to inform Clang of the time when the build started.
The build system also requests to enable this feature by passing
-fmodules-validate-once-per-build-session.  If these flags are not passed, the
behavior is not changed.  When Clang verifies the module the first time, it
writes out a timestamp file.  Then, when Clang loads the module the second
time, it finds a timestamp file, so it can compare the verification timestamp
of the module with the time when the build started.  If the verification
timestamp is too old, the module is verified again, and the timestamp file is
updated.

llvm-svn: 201224
2014-02-12 10:33:14 +00:00
Amara Emerson ecbe18e01d [ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.
This was caused by r200708 which enabled the crypto feature for these cores.

llvm-svn: 201223
2014-02-12 10:22:35 +00:00
Daniel Jasper d90ec5717a Fix memory leak introduced by r201010.
llvm-svn: 201220
2014-02-12 08:45:05 +00:00
Jonathan Roelofs 4c991ef3ef Fix r201205's use-after-free bug caught by sanitizer bot
llvm-svn: 201209
2014-02-12 06:37:27 +00:00
Jonathan Roelofs 2cea1bea87 Add Multilib selection machinery
This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

This reverts r201203 (i.e. re-applying r201202 with small fixes in
unittests/CMakeLists.txtto make the build bots happy).

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201205
2014-02-12 03:21:20 +00:00
Jonathan Roelofs 3fa96d8378 Revert 201202
Breaks cmake configure of new unit tests directory

llvm-svn: 201203
2014-02-12 01:36:51 +00:00
Jonathan Roelofs 0e7ec60b74 Add Multilib selection machinery
This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201202
2014-02-12 01:29:25 +00:00
David Majnemer 79a1c89066 MS ABI: vptr injection should obey alignment requirements
vptr injection must inject padding equivalent to the alignment of the
most aligned non-virtual subobject, not the alignment of the enclosing
record.

To fascilitate this change, don't let record layout observe the
alignment of the record until we've injected our vptrs. Also, do not
allow the alignment of vbases to affect required alignment until just
before we insert the vtordisp field.

llvm-svn: 201199
2014-02-12 00:43:02 +00:00
Alexander Kornienko 4c27c5b783 Fix build error caused by r201186 (GCC's "declaration of X changes meaning of Y").
llvm-svn: 201189
2014-02-11 22:14:03 +00:00