Commit Graph

186342 Commits

Author SHA1 Message Date
Sean Callanan 5c35f7cfd1 Cleaned up the StringLexer a little bit. It turns
out we only want to roll back text that was in the
buffer to begin with, so it's not necessary to
provide a pushback stack.

I'm going to use this slightly cleaner API to perform
lookahead for the Objective-C runtime type parser.

llvm-svn: 221640
2014-11-10 23:20:52 +00:00
Chad Rosier a9ae3e311c [yaml2obj] Support AArch64 relocations.
Patch by Daniel Stewart <stewartd@codeaurora.org>!
Phabricator Revision: http://reviews.llvm.org/D6192

llvm-svn: 221639
2014-11-10 23:02:03 +00:00
Rafael Espindola cd9339e755 configure.ac lives in autoconf/, not autotools/
Patch by Palmer Dabbelt!

llvm-svn: 221638
2014-11-10 22:36:04 +00:00
Zachary Turner 3985f891a3 [ProcessWindows] Notify process plugin when the launch succeeds.
llvm-svn: 221637
2014-11-10 22:32:18 +00:00
Zachary Turner ba80da60c8 Fix some compiler warnings, one of which was a legit bug.
MSVC warns that not all control paths return a value when a switch
doesn't have a default case handler.  Changed explicit value checks
to a default check.

Also, it caught a case where bitwise AND was being used instead of
logical AND.  I'm not sure what this fixes, but presumably it is
not covered by any kind of test case.

llvm-svn: 221636
2014-11-10 22:31:51 +00:00
Alexey Samsonov 4c1a96f519 Propagate SanitizerKind into CodeGenFunction::EmitCheck() call.
Make sure CodeGenFunction::EmitCheck() knows which sanitizer
it emits check for. Make CheckRecoverableKind enum an
implementation detail and move it away from header.

Currently CheckRecoverableKind is determined by the type of
sanitizer ("unreachable" and "return" are unrecoverable,
"vptr" is always-recoverable, all the rest are recoverable).
This will change in future if we allow to specify which sanitizers
are recoverable, and which are not by -fsanitize-recover= flag.

No functionality change.

llvm-svn: 221635
2014-11-10 22:27:30 +00:00
Ben Langmuir acb803e807 Validate user headers even if -fmodules-validate-once-per-build-session
is enabled. Unlike system headers, we want to be more careful about
modifications to user headers, because it's still easy to edit a header
while you're building.

llvm-svn: 221634
2014-11-10 22:13:10 +00:00
Greg Clayton 45f4f8bd7e Fix comments to match the current reality.
llvm-svn: 221633
2014-11-10 21:48:12 +00:00
Greg Clayton bd549169d7 Fix selectors not being objc-uniquified in the expression parser after a recent renaming in clang (clang change for revision 221451). This broke all objective C expressions in LLDB.
llvm-svn: 221632
2014-11-10 21:45:59 +00:00
Tim Northover 642e770f68 AArch64: set all processor features from -arch if nothing else present
Darwin's "-arch arm64" option implies full Cyclone CPU, for both architectural
and tuning purposes. So if neither of the explicit options have been given,
forward that on to the proper invocation.

rdar://problem/18906227

llvm-svn: 221631
2014-11-10 21:17:23 +00:00
Richard Smith 99c464c3f3 Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when a macro is used that expands to either the GNU noreturn attribute or _Noreturn.)
llvm-svn: 221630
2014-11-10 21:10:32 +00:00
Michael Kuperstein 217e1eec0d Reverting r221626 due to a too-strict test.
llvm-svn: 221629
2014-11-10 21:07:41 +00:00
Juergen Ributzka ea5870a530 [AArch64][FastISel] Fix kill flags for integer extends.
In the case we optimize an integer extend away and replace it directly with the
source register, we also have to clear all kill flags at all its uses.
This is necessary, because the orignal IR instruction might be trivially dead,
but we replaced it with a nop at MI level.

llvm-svn: 221628
2014-11-10 21:05:31 +00:00
Juergen Ributzka d441725d3d [SwitchLowering] Fix the "fixPhis" function.
Switch statements may have more than one incoming edge into the same BB if they
all have the same value. When the switch statement is converted these incoming
edges are now coming from multiple BBs. Updating all incoming values to be from
a single BB is incorrect and would generate invalid LLVM IR.

The fix is to only update the first occurrence of an incoming value. Switch
lowering will perform subsequent calls to this helper function for each incoming
edge with a new basic block - updating all edges in the process.

This fixes rdar://problem/18916275.

llvm-svn: 221627
2014-11-10 21:05:27 +00:00
Michael Kuperstein 3218b942f4 [X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits.
See PR20494 for details.

Differential Revision: http://reviews.llvm.org/D6128

llvm-svn: 221626
2014-11-10 20:40:21 +00:00
Bob Wilson 95dcc08e82 Remove change to set SDKROOT when building compiler-rt on Darwin.
This reverts the runtime library portion of r194168. As of r221621,
the libclang_rt libraries for Darwin build with explicit SDK options
so there is no need to set SDKROOT here.

llvm-svn: 221625
2014-11-10 20:01:19 +00:00
Enrico Granata 4c67655b45 Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
llvm-svn: 221624
2014-11-10 19:51:57 +00:00
Richard Smith 8e6923b7f2 Update fold-expression mangling to match cxx-abi-dev discussion.
llvm-svn: 221623
2014-11-10 19:44:15 +00:00
Bob Wilson 442e1e05e9 Clean up indentation after previous change.
llvm-svn: 221622
2014-11-10 19:38:18 +00:00
Bob Wilson 8aa9ab104c Build Darwin libclang_rt libraries against real SDKs.
The minimal fake SDK was very useful in allowing us to build for all
Darwin platforms without needing access to the real SDKs, but it did
not support building any of the sanitizer runtimes. It's important to
fix that. As a consequence, if you don't have the iOS SDKs installed,
we will now skip building the iOS-specific libclang_rt libraries.
rdar://problem/18825276

llvm-svn: 221621
2014-11-10 19:38:15 +00:00
Rafael Espindola 75b809c9b6 Copy externally_initialized in GlobalVariable::copyAttributesFrom.
Patch by Kevin Frei!

llvm-svn: 221620
2014-11-10 18:41:59 +00:00
Jingyue Wu 0c981bd7df [NVPTX] Add an NVPTX-specific TargetTransformInfo
Summary:
It currently only implements hasBranchDivergence, and will be extended
in later diffs.

Split from D6188.

Test Plan: make check-all

Reviewers: jholewinski

Reviewed By: jholewinski

Subscribers: llvm-commits, meheff, eliben, jholewinski

Differential Revision: http://reviews.llvm.org/D6195

llvm-svn: 221619
2014-11-10 18:38:25 +00:00
Rafael Espindola 4aa6bea7a2 Misc style fixes. NFC.
This fixes a few cases of:

* Wrong variable name style.
* Lines longer than 80 columns.
* Repeated names in comments.
* clang-format of the above.

This make the next patch a lot easier to read.

llvm-svn: 221615
2014-11-10 18:11:10 +00:00
Bob Wilson 94794d08b9 Only build iOS runtime libraries when the iOS SDKs are available.
This was already set up for the iOS simulator ASan dylib simulator,
and this change extends that to the other iOS runtime libraries.
This is in preparation for building all those iOS libraries against
the real SDKs instead of the fake SDKs in compiler-rt.

llvm-svn: 221614
2014-11-10 17:46:55 +00:00
Vasileios Kalintiris ccde2a9a1e Fix extra semicolon warning. NFC.
llvm-svn: 221613
2014-11-10 17:37:53 +00:00
Zoran Jovanovic 37bca10148 [mips][microMIPS] Fix issue with delay slot filler and microMIPS
Differential Revision: http://reviews.llvm.org/D6193

llvm-svn: 221612
2014-11-10 17:27:56 +00:00
Ed Maste 29a4584484 Fix new noreturn test on !darwin platforms
r221575 introduced a NoreturnUnwind test that did not skip the dsym
test on non-darwin platforms, and had the @dwarf_test case as an exact
copy of the dsym case (including the test name, test_with_dsym).

llvm-svn: 221611
2014-11-10 17:22:47 +00:00
Bob Wilson da37021cf3 Do not build a separate x86_64h Haswell slice for the iOS simulator.
r199996 added new x86_64h slices for all the Darwin compiler_rt libraries
that had an x86_64 slice, but that is overkill for the iOS Simulator
platform where the x86_64h slice is never used.

llvm-svn: 221610
2014-11-10 17:05:21 +00:00
Daniel Jasper 0bd9a19b28 clang-format: Fix pointer formatting.
Before:
  void f(Bar* a = nullptr, Bar * b);
After:
  void f(Bar* a = nullptr, Bar* b);

llvm-svn: 221609
2014-11-10 16:57:30 +00:00
Rafael Espindola 101b364b46 Fix variable names and comment style. NFC.
llvm-svn: 221608
2014-11-10 16:31:06 +00:00
Nico Weber a644d7f39c clang-format: [Java] Never treat @interface as annotation.
'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.

llvm-svn: 221607
2014-11-10 16:30:02 +00:00
Nico Weber 337f5b27ad clang-format: Document that --assume-filename affects the language.
llvm-svn: 221606
2014-11-10 16:14:54 +00:00
Benjamin Kramer 283afa3f12 Remove unused diagnostic.
llvm-svn: 221605
2014-11-10 16:07:58 +00:00
Daniel Sanders 87f9b88bfb [mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.
llvm-svn: 221604
2014-11-10 15:57:53 +00:00
Simon Atanasyan 7b2e2b7d01 [Mips] Replace the redundant condition by assert call
No functional changes.

llvm-svn: 221603
2014-11-10 15:50:22 +00:00
Simon Atanasyan 1255354141 [Mips] Do not read addends for relocations which do not use them
No functional changes.

llvm-svn: 221602
2014-11-10 15:50:01 +00:00
Marshall Clow 68640684e8 Update status pages for C++1z
llvm-svn: 221601
2014-11-10 15:43:20 +00:00
Alexander Kornienko c48a535a7c [Tooling] Restore current directory after processing each file.
Summary:
If we actually change directory before processing a file, we need to
restore it afterwards. This was broken in r216620.

Added a comment for the changes in r216620.

Reviewers: klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D6162

llvm-svn: 221600
2014-11-10 15:42:31 +00:00
Viktor Kutuzov d98b348cb9 Enable running Ubsan tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D6089

llvm-svn: 221599
2014-11-10 15:31:56 +00:00
Manuel Klimek fb9e32b4b2 Mark test using python as REQUIRES: python27.
llvm-svn: 221598
2014-11-10 15:29:29 +00:00
Viktor Kutuzov eb5e79550a [Ubsan] Fix the missing_return.cpp test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6088

llvm-svn: 221597
2014-11-10 15:27:13 +00:00
Viktor Kutuzov f686063f57 [Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D6087

llvm-svn: 221596
2014-11-10 15:25:01 +00:00
Viktor Kutuzov dc6cbfe859 [Sanitizers] Enable stack traces on FreeBSD
Differential Revision: http://reviews.llvm.org/D6086

llvm-svn: 221595
2014-11-10 15:22:04 +00:00
Shankar Easwaran 156ffbc4c0 [ELF] add missing test for max-page-size
llvm-svn: 221594
2014-11-10 15:16:31 +00:00
Shawn Best e1a76dba0d LLGS Android target support (r221570) missed adding some files: http://reviews.llvm.org/D6166
llvm-svn: 221593
2014-11-10 15:06:15 +00:00
NAKAMURA Takumi f96d423fd8 [CMake] llvm-c-test: Use libLLVM.so if it is available.
llvm-svn: 221592
2014-11-10 15:04:26 +00:00
NAKAMURA Takumi c8abc4c201 [CMake] Let llvm-shlib work on Linux with --whole-archive.
FIXME: It should work on not only Linux but elf-targeting gnu ld.

For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like;

  -Wl,--whole-archive
    lib/libLLVMBitWriter.a
    lib/libLLVMSupport.a *1
  -Wl,--no-whole-archive
  lib/libLLVMCore.a
  lib/libLLVMSupport.a   *2
  -lrt -ldl -ltinfo -lpthread -lm

It works since symbols in LLVMCore is resolved with not *2 but *1.

Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries.

I am still experimenting other way not to rely on --whole-archive.

llvm-svn: 221591
2014-11-10 15:04:02 +00:00
NAKAMURA Takumi e1e5274a88 [CMake] Move llvm-shlib in prior to other tools.
llvm-svn: 221590
2014-11-10 15:03:02 +00:00
Shankar Easwaran 7757f1ace6 [Gnu] Support --image-base option
The value for --image-base is used as the base address of the program.

llvm-svn: 221589
2014-11-10 14:55:21 +00:00
Shankar Easwaran 7a82510348 [ELF] Fix DT_INIT_ARRAY{SZ} and DT_FINI_ARRAY{SZ}
The dynamic table was creating the entry DT_FINI_ARRAY{SZ} even when there was
no .fini_array section. The entries should be creating in the dynamic section
only if there are sections .init_array/.fini_array in the output.

Fixes the tests that checked for errroneous outputs.

llvm-svn: 221588
2014-11-10 14:55:11 +00:00