Commit Graph

192396 Commits

Author SHA1 Message Date
Greg Clayton 08928f308b Don't wait for the dynamic loader to set a module as a dynamic link editor, figure it out through the ObjectFile.
Background: dyld binaries often have extra symbols in their symbol table like "malloc" and "free" for the early bringup of dyld and we often don't want to set breakpoints in dynamic linker binaries. We also don't want to call the "malloc" or "free" function in dyld when a user writes an expression like "(void *)malloc(123)" so we need to avoid doing name lookups in dyld. We mark Modules as being dynamic link editors and this helps do correct lookups for breakpoints by name and function lookups.

<rdar://problem/19716267>

llvm-svn: 228261
2015-02-05 02:01:34 +00:00
Shankar Easwaran 50ad727051 [ELF] Dont release ownership of MemoryBuffer.
MemoryBuffer is being released too early. ELFFile owns MemoryBuffer.

llvm-svn: 228260
2015-02-05 02:00:03 +00:00
Ahmed Bougacha c7f241cba9 [ARM] Use patterns instead of hardcoded regs in test. NFC.
llvm-svn: 228259
2015-02-05 01:52:19 +00:00
Ahmed Bougacha daaf3d9b58 [ARM] Make testcase more explicit. NFC.
The q8/d16 thing is silly;  I'd be happy to hear about a better
way to write those tests where simple substitution isn't enough..

llvm-svn: 228258
2015-02-05 01:45:28 +00:00
Dan Albert 3bd13ca4e1 Enable -Wundef.
The problem that caused the need for http://reviews.llvm.org/D7419 was
caused by testing the value of something that was undefined. This
should prevent that in the future.

llvm-svn: 228257
2015-02-05 01:33:15 +00:00
Reid Kleckner 9ccec06623 Try to fix the build in MCValue.cpp
llvm-svn: 228256
2015-02-05 01:23:14 +00:00
Sean Silva b1287ee5c9 Silence a warning.
/Users/Sean/pg/llvm/tools/clang/lib/CodeGen/CGException.cpp:1871:23: warning: unused variable 'Finally' [-Wunused-variable]
  if (SEHFinallyStmt *Finally = S.getFinallyHandler()) {
                      ^
1 warning generated.

llvm-svn: 228255
2015-02-05 01:20:26 +00:00
Sean Silva 32f24c49d2 Fixup.
Didn't see these calls in my release build locally when testing.

llvm-svn: 228254
2015-02-05 01:13:47 +00:00
Bill Schmidt 0a9c061343 [PowerPC] Revert workaround for TLS linker bug
In r227480, Ulrich Weigand introduced a workaround for a linker
optimization bug that can create mis-optimized code for accesses to
general-dynamic or local-dynamic TLS variables.  The linker
optimization bug only occurred for Clang/LLVM because of some
inefficient code being generated for these TLS accesses.  I have
recently corrected LLVM to produce the efficient code sequence
expected by the linkers, so this workaround is no longer needed.
Therefore this patch reverts r227480.

I've tested that the previous bootstrap failure no longer occurs with
the workaround reverted.

llvm-svn: 228253
2015-02-05 01:12:24 +00:00
Eric Christopher ddaf4fd680 lldReaderWriter.a depends on lldCore.a so make sure
to link that in as well.

llvm-svn: 228252
2015-02-05 01:10:40 +00:00
Eric Christopher 8e4f68b141 The PPC lld backend has been removed, don't require it here.
llvm-svn: 228251
2015-02-05 01:10:10 +00:00
Duncan P. N. Exon Smith 252b62d3c2 IR: Split out getOperandAs(), NFC
llvm-svn: 228250
2015-02-05 01:07:47 +00:00
Anna Zaks f4c7ce8a37 [analyzer] Relax an assertion in VisitLvalArraySubscriptExpr
The analyzer thinks that ArraySubscriptExpr cannot be an r-value (ever).
However, it can be in some corner cases. Specifically, C forbids expressions
of unqualified void type from being l-values.

Note, the analyzer will keep modeling the subscript expr as an l-value. The
analyzer should be treating void* as a char array
(https://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Pointer-Arith.html).

llvm-svn: 228249
2015-02-05 01:02:59 +00:00
Anna Zaks 33f0632640 [analyzer] Do not crash in the KeychainAPI checker on user defined 'free()'.
llvm-svn: 228248
2015-02-05 01:02:56 +00:00
Anna Zaks 486a0ff4b7 [analyzer] Look for allocation site in the parent frames as well as the current one.
Instead of handling edge cases (mostly involving blocks), where we have difficulty finding
an allocation statement, allow the allocation site to be in a parent node.

Previously we assumed that the allocation site can always be found in the same frame
as allocation, but there are scenarios in which an element is leaked in a child
frame but is allocated in the parent.

llvm-svn: 228247
2015-02-05 01:02:53 +00:00
Anna Zaks 7b6da65990 [analyzer] Don't skip analyzing the functions in preprocessed files.
The change in main file detection ended up disabling the path-sensitive
analysis of functions within preprocessed files.

llvm-svn: 228246
2015-02-05 01:02:47 +00:00
NAKAMURA Takumi b1980e63d7 Tweak clang/test/CodeGenCXX/debug-info-line.cpp for -Asserts.
CHECK: call {{.*}}src

matched

  %call = invoke dereferenceable(4) i32* @_Z3srcv()

I don't think it was intentional.

llvm-svn: 228245
2015-02-05 01:02:34 +00:00
Sean Silva 0e1fe184c8 [MC] Remove various unused MCAsmInfo parameters.
llvm-svn: 228244
2015-02-05 00:58:51 +00:00
Reid Kleckner 16f9a6b43d Fix crash on finally blocks that don't fall through
llvm-svn: 228243
2015-02-05 00:58:46 +00:00
Duncan P. N. Exon Smith 9c26d80c18 IR: Rename 'operator ==()' to 'isKeyOf()', NFC
`isKeyOf()` is a clearer name than overloading `operator==()`.

llvm-svn: 228242
2015-02-05 00:51:35 +00:00
Reid Kleckner 1fcccdd78e Fix build break, these builtins don't exist
llvm-svn: 228241
2015-02-05 00:24:57 +00:00
Reid Kleckner 8a8c129a4b Do the same IRgen for __builtin_pow* as for pow*
There's no reason for these to be different.

llvm-svn: 228240
2015-02-05 00:18:01 +00:00
Duncan P. N. Exon Smith 5a914a8c63 ADT: Add int64_t interoperability to APSInt
Add some API to `APSInt` to make it easier to compare with `int64_t`.

  - `APSInt::compareValues(APSInt, APSInt)` returns 1, -1 or 0 for
    greater, lesser, or equal, doing the right thing for mismatched
    "has-sign" and bitwidths.  This is just like `isSameValue()` (and is
    now the implementation of it).
  - `APSInt::get(int64_t)` gets a signed `APSInt`.
  - `operator<(int64_t)`, etc., are implemented trivially via `get()`
    and `compareValues()`.
  - Also added `APSInt::getUnsigned(uint64_t)` to make it easier to test
    `compareValues()`.

llvm-svn: 228239
2015-02-05 00:17:43 +00:00
Colin LeMahieu ceebe8659b [Hexagon] Deleting unused instructions and adding isCodeGenOnly to some defs.
llvm-svn: 228238
2015-02-05 00:10:16 +00:00
Colin LeMahieu 9cb9078ccf [Hexagon] Updating load extend to i64 patterns.
llvm-svn: 228237
2015-02-04 23:55:16 +00:00
Reid Kleckner 86ea770775 Driver: Stop forcing frame pointer usage on Windows
Previously, we would use a frame pointer by default on non-Linux OSs. On
Linux, any optimization flags imply -fomit-frame-pointer. XCore always
defaulted to -fomit-frame-pointer.

Now x86 Windows matches our behavior on Linux. All other ISAs supported
by Windows (ARM, x64) use xdata information, and frame pointers aren't
useful. Frame pointers are now off by default for such targets, but can
be forced via -fno-omit-frame-pointer and code using alloca().

In fact, on Win64 our frame-pointer prologue is not describable with
UNWIND_INFO. This change is a workaround to avoid using the broken FP
using prologue for most functions. This is PR22467.

llvm-svn: 228236
2015-02-04 23:45:07 +00:00
Kostya Serebryany 92e0476c67 [fuzzer] add flag prefer_small_during_initial_shuffle, be a bit more verbose
llvm-svn: 228235
2015-02-04 23:42:42 +00:00
Richard Smith 4eca9b9372 [modules] When using -E, we may try to merge decls despite having no Sema
object. In such a case, use the TU's DC for merging global decls rather than
giving up when we find there is no TU scope.

Ultimately, we should probably avoid all loading of decls when preprocessing,
but there are other reasonable use cases for loading an AST file with no Sema
object for which this is the right thing.

llvm-svn: 228234
2015-02-04 23:37:59 +00:00
Colin LeMahieu 712d5c393b [Hexagon] Cleaning up i1 load and extension patterns.
llvm-svn: 228232
2015-02-04 23:27:48 +00:00
Colin LeMahieu 90a91bbf43 [Hexagon] Simplifying more load and store patterns and using new addressing patterns.
llvm-svn: 228231
2015-02-04 23:23:16 +00:00
Oleksiy Vyalov 1ef7b2c897 Extend SBPlatform with capability to launch/terminate a process remotely. Integrate this change into test framework in order to spawn processes on a remote target.
http://reviews.llvm.org/D7263

llvm-svn: 228230
2015-02-04 23:19:15 +00:00
Reid Kleckner 2c1990778d Remove useless call to isOSCygMing()
This used to do something when we modeled the Cygwin and MinGW
environments as distinct OSs, but now it is not needed.

llvm-svn: 228229
2015-02-04 23:17:19 +00:00
Tom Stellard f6afc80cc0 R600/SI: Enable subreg liveness by default
llvm-svn: 228228
2015-02-04 23:14:18 +00:00
Colin LeMahieu ad13d4e8a6 [Hexagon] Simplifying some load and store patterns.
llvm-svn: 228227
2015-02-04 23:10:21 +00:00
Duncan P. N. Exon Smith 9c93dc6453 AsmParser: Split out LineField, NFC
Split out `LineField`, which restricts the legal line numbers.  This
will make it easier to be consistent between different node parsers.

llvm-svn: 228226
2015-02-04 22:59:18 +00:00
Colin LeMahieu 68292c96da [Hexagon] Converting absolute-address load patterns to use AddrGP.
llvm-svn: 228225
2015-02-04 22:54:51 +00:00
Reid Kleckner d9041a3d99 Unbreak the cmake build by adding some new files
llvm-svn: 228224
2015-02-04 22:46:17 +00:00
Colin LeMahieu 8bf5de10c3 [Hexagon] Converting atomic store/load to use AddrGP addressing.
llvm-svn: 228223
2015-02-04 22:40:36 +00:00
Reid Kleckner aca01db706 Implement IRGen for SEH __finally and AbnormalTermination
Previously we would simply double-emit the body of the __finally block,
but that doesn't work when it contains any kind of Decl, which we can't
double emit.

This fixes that by emitting the block once and branching into a shared
code region and then branching back out.

llvm-svn: 228222
2015-02-04 22:37:07 +00:00
Reid Kleckner ba77ad75d3 Don't warn or note if bash is missing
We haven't needed bash on Windows to run the test suite for a long time
now.

Patch by Michael Edwards!

llvm-svn: 228221
2015-02-04 22:36:52 +00:00
Colin LeMahieu 5149135369 [Hexagon] Simplifying some store patterns. Adding AddrGP addressing forms.
llvm-svn: 228220
2015-02-04 22:36:28 +00:00
Filipe Cabecinhas b36685ee85 Handle LLVM_USE_SANITIZER=Address;Undefined (and the other way around)
Summary:
Handle LLVM_USE_SANITIZER=Address;Undefined to enable ASan and UBSan
If UBSan is compatible with more of the other sanitizers, maybe we should
deal with this in a better way where we allow combining UBSan with any of
the other sanitizers.

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 228219
2015-02-04 22:33:31 +00:00
Vince Harron cd540c095a fixed copy/paste error in comment
-This line, and those below, will be ignored--

M    include/lldb/Target/FileAction.h

llvm-svn: 228218
2015-02-04 22:31:44 +00:00
Vince Harron fa03bac794 Get test/types tests passing on remote targets
redirecting output to a path that will work well on host or target.
copying file from output location to location on local host that
test will read from

llvm-svn: 228217
2015-02-04 22:25:34 +00:00
Greg Clayton 281b65bcde Update documenation for the changed in from ${var.script:<pythonfunction>} to the new ${script.var:<pythonfunction>}.
llvm-svn: 228216
2015-02-04 22:24:47 +00:00
Kostya Serebryany 33f866922a [fuzzer] add -runs=N to limit the number of runs per session. Also, make sure we do some mutations w/o cross over.
llvm-svn: 228214
2015-02-04 22:20:09 +00:00
Duncan P. N. Exon Smith 2f09c46f80 Fix GCC error caused by r228211
llvm-svn: 228213
2015-02-04 22:13:28 +00:00
Duncan P. N. Exon Smith 8af6cfcdb2 IR: Reduce boilerplate in DenseMapInfo overrides, NFC
Minimize the boilerplate required for the `MDNode` subclass
`DenseMapInfo<>` overrides in `LLVMContextImpl`.

llvm-svn: 228212
2015-02-04 22:08:30 +00:00
Duncan P. N. Exon Smith 077c0318dc AsmParser: Move MDField details to source file, NFC
Move all the types of `MDField` to an anonymous namespace in the source
file.  This also eliminates the duplication of `ParseMDField()`
declarations in the header for each new field type.

llvm-svn: 228211
2015-02-04 22:05:21 +00:00
Greg Clayton 79ede57194 Remove changes I accidentally checked in with my previous commit.
llvm-svn: 228210
2015-02-04 22:02:49 +00:00