Commit Graph

173930 Commits

Author SHA1 Message Date
Timur Iskhodzhanov 21a22d34be [ASan tests] More progress towards Windows support
llvm-svn: 208326
2014-05-08 15:13:26 +00:00
Timur Iskhodzhanov 48253ed689 [ASan tests] More progress towards Windows support
llvm-svn: 208325
2014-05-08 15:05:42 +00:00
Rafael Espindola 8dcd6e767b Replace virtual with override.
llvm-svn: 208324
2014-05-08 15:01:48 +00:00
Timur Iskhodzhanov 498052b8eb [ASan tests] More progress towards Windows support
llvm-svn: 208323
2014-05-08 15:01:29 +00:00
Timur Iskhodzhanov fddadefc33 [ASan tests] Auto-define ASAN_NEEDS_SEGV rather than hardcode it in cmake
llvm-svn: 208322
2014-05-08 14:53:59 +00:00
Rafael Espindola 649263626a Use more specific type.
llvm-svn: 208321
2014-05-08 14:46:46 +00:00
Rafael Espindola 489c66b268 Small simplification: Reduce the use of cast<>.
llvm-svn: 208320
2014-05-08 14:33:38 +00:00
Marshall Clow 5c520bd985 Add Address Sanitizer support to std::vector
llvm-svn: 208319
2014-05-08 14:14:06 +00:00
Bradley Smith 4c0274b663 [ARM64] Ensure immediates in extend operands are in a valid range
Also emit a more useful diagnostic when they are not.

llvm-svn: 208318
2014-05-08 14:12:12 +00:00
Bradley Smith 545caa6fa3 [ARM64] Check for proper immediate in shift/extend operands
llvm-svn: 208317
2014-05-08 14:11:16 +00:00
Christian Pirker b5728191c2 ARM big endian function argument passing
llvm-svn: 208316
2014-05-08 14:06:24 +00:00
Diego Novillo 6dc9c4814f Fix segmentation fault when mixing -Rpass with #line.
Summary:
When using #line directives, FileManager::getFile() will return a nil
entry. This triggers an assert in translateFileLineCol().

This patch handles nil FileEntry instances by emitting a note that the
location could not be translated back to a SourceLocation. I don't
really like this solution, but we are translating presumed locations,
so some information has already been lost.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 208315
2014-05-08 13:49:54 +00:00
Hal Finkel e8172d85f9 Fix a spelling error
llvm-svn: 208314
2014-05-08 13:42:57 +00:00
Karthik Bhat 967c13d3fb Fix PR19169 [Crash on invalid attempting to specialize a template method as a template variable].
A template declaration of a template name can be null in case we have a dependent name or a set of function templates.
Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case.

llvm-svn: 208313
2014-05-08 13:16:20 +00:00
Rafael Espindola c47b0a1b99 Use predicate function to simplify a bit.
llvm-svn: 208312
2014-05-08 13:07:37 +00:00
Daniel Sanders cdbbe08b05 [mips] Implement l[wd]c3, and s[wd]c3.
Summary:
These instructions were added in MIPS-I, and MIPS-II but were removed in
MIPS-III. Interestingly, GAS continues to accept them when assembling for
MIPS-III.

For the moment, these instructions will follow GAS and accept them for
MIPS-III and newer but this will be tightened up when the invalid-*.s
tests are added.

Depends on D3647

Reviewers: vmedic

Reviewed By: vmedic

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

llvm-svn: 208311
2014-05-08 13:02:11 +00:00
Ed Maste 279b97c130 Enable standalone-debug by default on FreeBSD
It was set by default on Darwin in r198655.  The same usability issues
with DTrace and LLDB apply to FreeBSD, so set it by default there too.

rdar://problem/15758808
http://llvm.org/pr19676

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

llvm-svn: 208310
2014-05-08 13:01:26 +00:00
Ed Maste 6b008bf205 Add isOSFreeBSD triple test
For http://reviews.llvm.org/D3448

llvm-svn: 208309
2014-05-08 13:00:15 +00:00
Dario Domizioli 058a8fd36c Revert test commit. Removed blank line.
llvm-svn: 208308
2014-05-08 12:54:43 +00:00
James Molloy c42ea14f74 [ARM64-BE] Teach fast-isel about how to set up sub-word stack arguments for big endian calls.
SelectionDAG already knows about this, but fast-isel was ignorant.

llvm-svn: 208307
2014-05-08 12:53:50 +00:00
Timur Iskhodzhanov 76f43eecb0 [ASan] Update sanitizer_common and asan test_util headers to support building on Windows
llvm-svn: 208306
2014-05-08 12:43:33 +00:00
Daniel Sanders d39320c6b6 [mips] Marked up instructions added in MIPS-II and tested that IAS for -mcpu=mips1 does not accept them
Summary:
A small number of instructions are rejected with the wrong error message.
These have been placed in a separate test for now. There seems to be some
parsing quirk that triggers when these instructions are disabled.

Depends on D3571

Reviewers: vmedic

Reviewed By: vmedic

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

llvm-svn: 208305
2014-05-08 12:40:48 +00:00
Daniel Jasper 05cd586863 clang-format: Cleanup redundant calculation of ParenLevel.
No functional changes intended.

llvm-svn: 208304
2014-05-08 12:21:30 +00:00
Evgeniy Stepanov c5e51926dc [msan] Intercept strxfrm.
llvm-svn: 208303
2014-05-08 12:04:01 +00:00
Daniel Jasper 04a71a45ff clang-format: Initial support for try-catch.
Most of this patch was created by Alexander Rojas in
http://reviews.llvm.org/D2555
Thank you!

Synced and addressed review comments.

llvm-svn: 208302
2014-05-08 11:58:24 +00:00
Daniel Sanders 8dcb116a3e [mips] Implement tlbp, tlbr, tlbwi, and tlbwr
Reviewers: vmedic, dsanders

Reviewed By: dsanders

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

llvm-svn: 208301
2014-05-08 11:51:18 +00:00
Manuel Klimek b33bded176 Explicitly keep track of temporaries during the consumed analysis.
This makes the consumed analysis less dependent on the CFG layout and fixes
a bug where we wouldn't warn on an unconsumed value.

llvm-svn: 208300
2014-05-08 11:50:00 +00:00
Ismail Pazarbasi 49ff754d4b Suggest fix-it ':' when '=' used in for-range-declaration
Fix for PR19176. Clang will suggest a fix-it hint for cases like:
  int arr[] = {1, 2, 3, 4};
  for (auto i = arr)
              ^
              :

llvm-svn: 208299
2014-05-08 11:28:25 +00:00
Dario Domizioli a2fa84edbf Test commit. Added blank line.
llvm-svn: 208298
2014-05-08 11:28:14 +00:00
Tim Northover 18f8bb84fa ARM64: make sure FastISel emits SSA MachineInstrs
We need to use a temporary register for a 2-step operation like REM.

llvm-svn: 208297
2014-05-08 10:30:56 +00:00
Evgeniy Stepanov 9661ec0ec3 [asan] Preserve flags in asm instrumentation.
Patch by Yuri Gorshenin.

llvm-svn: 208296
2014-05-08 09:55:24 +00:00
Evgeniy Stepanov ac030ffb69 [msan] Switch to common printf interceptors.
Format string parsing is disabled by default.
This is not expected to meaningfully change the tool behavior.
With this change, check_printf flag could be used to evaluate printf format
string parsing in MSan.

llvm-svn: 208295
2014-05-08 09:50:59 +00:00
Evgeniy Stepanov 9c20cb1a7c [msan] Fix potential infinite recursion in a test.
If printf is intercepted (it is not atm), REAL(printf) call in the interceptor
would get redirected back to my_lgamma, resulting in infinite recursion.

llvm-svn: 208294
2014-05-08 09:37:36 +00:00
Daniel Sanders 2b6b3d1c5d Use a vector of unique_ptrs to fix a memory leak introduced in r208179.
Also removed an inaccurate comment that stated that a DenseMap was used as
storage for the ListInit*'s. It's currently using a FoldingSet.

I expect there's a better way to fix this but I haven't found it yet. FoldingSet
is incompatible with the Pool template and I'm not sure if FoldingSet can be
safely replaced with a DenseMap of computed FoldingSetID's to ListInit*'s.

llvm-svn: 208293
2014-05-08 09:29:28 +00:00
Daniel Jasper c03e16a7bc clang-format: [JS] support closures in container literals.
Before:
  return {body: {setAttribute: function(key, val) {this[key] = val;
  }
  , getAttribute : function(key) { return this[key]; }
  , style : {
  direction:
    ''
  }
  }
  }
  ;

After:
  return {
    body: {
      setAttribute: function(key, val) { this[key] = val; },
      getAttribute: function(key) { return this[key]; },
      style: {direction: ''}
    }
  };

llvm-svn: 208292
2014-05-08 09:25:39 +00:00
Evgeniy Stepanov 5ee9fd5f45 [asan] Update tests for r208290.
sprintf output buffer is now always sanitized.

llvm-svn: 208291
2014-05-08 09:24:53 +00:00
Evgeniy Stepanov d31ac26230 [sanitizer] Unconditionally write to target buffer in *sprintf interceptors.
This does not change the default behavior (check_printf in on by default in all tools).
With this change, check_printf flag only affects format string parsing.

llvm-svn: 208290
2014-05-08 09:18:22 +00:00
Hal Finkel 6532c20faa Move late partial-unrolling thresholds into the processor definitions
The old method used by X86TTI to determine partial-unrolling thresholds was
messy (because it worked by testing target features), and also would not
correctly identify the target CPU if certain target features were disabled.
After some discussions on IRC with Chandler et al., it was decided that the
processor scheduling models were the right containers for this information
(because it is often tied to special uop dispatch-buffer sizes).

This does represent a small functionality change:
 - For generic x86-64 (which uses the SB model and, thus, will get some
   unrolling).
 - For AMD cores (because they still currently use the SB scheduling model)
 - For Haswell (based on benchmarking by Louis Gerbarg, it was decided to bump
   the default threshold to 50; we're working on a test case for this).
Otherwise, nothing has changed for any other targets. The logic, however, has
been moved into BasicTTI, so other targets may now also opt-in to this
functionality simply by setting LoopMicroOpBufferSize in their processor
model definitions.

llvm-svn: 208289
2014-05-08 09:14:44 +00:00
Daniel Jasper ea2d042f89 clang-format: Fix binary operator detection before lambdas.
Before:
  bool foo = true&& [] { return false; }();

After:
  bool foo = true && [] { return false; }();

llvm-svn: 208288
2014-05-08 08:50:10 +00:00
Tobias Grosser a0e051e004 Adapt to DomTree changes in r199104
This fixes the compilation of our GPGPU code generation experiment in Polly.

Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208287
2014-05-08 08:34:23 +00:00
Tobias Grosser 3080cf16a5 Revert "SCEV: Use I = vector<>.erase(I) to iterate and delete at the same time"
as committed in r208282. The original commit was incorrect.

llvm-svn: 208286
2014-05-08 07:55:34 +00:00
Daniel Jasper f7405c129e clang-format: [JS] Support regex literals after 'return'.
llvm-svn: 208285
2014-05-08 07:45:18 +00:00
Hao Liu 1187a3d8db AArch64/ARM64: Port NEON post-increment load/store with 2/3/4 vectors to ARM64 backend.
llvm-svn: 208284
2014-05-08 07:38:13 +00:00
Tobias Grosser ecfe9d06eb SCEV: Use I = vector<>.erase(I) to iterate and delete at the same time
llvm-svn: 208282
2014-05-08 07:12:44 +00:00
Daniel Jasper f9ae312fc0 clang-format: [JS] Initial support for regex literals.
llvm-svn: 208281
2014-05-08 07:01:45 +00:00
Craig Topper f1186c5a8f [C++11] Use 'nullptr'.
llvm-svn: 208280
2014-05-08 06:41:40 +00:00
Alexey Bataev 0120ce8c9f [OPENMP] Another one fix in test for msvc
llvm-svn: 208279
2014-05-08 04:44:21 +00:00
Alexey Bataev 3e4fa2fff7 [OPENMP] Fix codegen test for msvc build
llvm-svn: 208278
2014-05-08 04:33:26 +00:00
Nico Weber 824285ec53 Let ASTReader optionally delete its ASTDeserializationListener.
Use this to fix the leak of DeserializedDeclsDumper and DeserializedDeclsChecker
in FrontendAction (found by LSan), PR19560.

The "delete this" bool is necessary because both PCHGenerator and ASTUnit
return the same object from both getDeserializationListener() and
getASTMutationListener(), so ASTReader can't just have a unique_ptr.

It's also not possible to just let FrontendAction (or CompilerInstance) own
these listeners due to lifetime issues (see comments on PR19560).

Finally, ASTDeserializationListener can't easily be refcounted, since several of
the current listeners are allocated on the stack.

Having this bool isn't ideal, but it's a pattern that's used in other places in
the codebase too, and it seems better than leaking.

llvm-svn: 208277
2014-05-08 04:26:47 +00:00
Richard Smith 789d3007fb [modules] Add missing #include.
llvm-svn: 208276
2014-05-08 02:34:32 +00:00