Commit Graph

150346 Commits

Author SHA1 Message Date
Daniel Jasper 41a0f78d43 Add return missing in r182855.
llvm-svn: 182856
2013-05-29 14:09:17 +00:00
Daniel Jasper 40e1921f2a Leave some macros on their own line
If an identifier is on its own line and it is all upper case, it is highly
likely that this is a macro that is meant to stand on a line by itself.

Before:
class A : public QObject {
  Q_OBJECT A() {}
};

Ater:
class A : public QObject {
  Q_OBJECT

  A() {}
};

llvm-svn: 182855
2013-05-29 13:16:10 +00:00
Sergey Matveev 09886cd17a [asan] Make ASan report the correct thread address ranges to LSan.
This CL enables thread support in LSan when used on top of ASan.

llvm-svn: 182854
2013-05-29 13:09:44 +00:00
Sergey Matveev 89bcec8117 [sanitizer] Change the way GetThreadStackAndTls() obtains the thread descriptor address.
Instead of using arch_prctl(ARCH_GET_FS), read the address from the
tread descriptor itself. This lets us avoid sandboxing issues. Also,
GetThreadStackAndTls() can now be implemented on i386.

llvm-svn: 182853
2013-05-29 13:07:42 +00:00
Evgeniy Stepanov 677003140c [sanitizer] Fix getaddrinfo interceptor to use the actual returned sockaddr size.
llvm-svn: 182852
2013-05-29 12:33:31 +00:00
Peter Collingbourne 112e5ba281 [nolibc] Unweak SymbolizerPrepareForSandboxing and move it to libc-independent part.
Fixes the Go build.

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

llvm-svn: 182851
2013-05-29 12:11:43 +00:00
NAKAMURA Takumi dbd3bbe126 SparcFrameLowering.cpp: Mark verifyLeafProcRegUse() as UNUSED. [-Wunused-function]
llvm-svn: 182850
2013-05-29 12:10:42 +00:00
Daniel Jasper 61e6bbf850 Add option to always break template declarations.
With option enabled (e.g. in Google-style):
template <typename T>
void f() {}

With option disabled:
template <typename T> void f() {}

Enabling this for Google-style and Chromium-style, not sure which other
styles would prefer that.

llvm-svn: 182849
2013-05-29 12:07:31 +00:00
Timur Iskhodzhanov 6ba477aa05 Fix MSVC warnings at the -W2 level
llvm-svn: 182848
2013-05-29 12:03:49 +00:00
Richard Sandiford ba97c34bb6 [SystemZ] Two tests missing from previous commit
llvm-svn: 182847
2013-05-29 11:59:26 +00:00
Richard Sandiford e1d9f00f09 [SystemZ] Immediate compare-and-branch support
This patch adds support for the CIJ and CGIJ instructions.

llvm-svn: 182846
2013-05-29 11:58:52 +00:00
Evgeniy Stepanov a4bf67e461 [sanitizer] Fix Mac build.
llvm-svn: 182845
2013-05-29 11:55:27 +00:00
Evgeniy Stepanov fc708db4c1 [sanitizer] Intercept getpeername.
llvm-svn: 182844
2013-05-29 11:49:25 +00:00
Evgeniy Stepanov a4d08c4e87 [sanitizer] Move TSan and MSan recvmsg interceptors to common.
llvm-svn: 182843
2013-05-29 11:30:00 +00:00
Dmitry Vyukov 2b997d2914 tsan: match "race" suppressions against "race on vptr" reports
llvm-svn: 182842
2013-05-29 11:23:54 +00:00
Peter Collingbourne 93aa8dfb78 [nolibc] Now that we have a custom allocator, remove dummy allocator
definitions from test.

llvm-svn: 182841
2013-05-29 10:52:59 +00:00
Alexey Samsonov 25ad5a6735 [sanitizer] Use raw check in internal allocator to prevent self-deadlocks. Try to fix Windows build.
llvm-svn: 182840
2013-05-29 10:41:53 +00:00
Sergey Matveev e615432313 [lsan] Convert the remaining LSan tests to output tests.
llvm-svn: 182839
2013-05-29 10:12:37 +00:00
Evgeniy Stepanov f28217ad0e [sanitizer] modf/modff/modfl interceptors.
llvm-svn: 182838
2013-05-29 10:03:11 +00:00
Alexey Samsonov 75289297af Exclude sanitizer_nolibc_test from TSan test run. Fix lint warnings
llvm-svn: 182837
2013-05-29 09:40:07 +00:00
Alexey Samsonov c30e2d6b3a Make InternalAlloc/InternalFree in sanitizer runtimes libc-free by switching to a custom allocator.
llvm-svn: 182836
2013-05-29 09:15:39 +00:00
Evgeniy Stepanov 08f662845d [sanitizer] Share TSan accept & accept4 interceptors with other sanitizers.
llvm-svn: 182835
2013-05-29 09:09:58 +00:00
Benjamin Kramer 490bc1a27f Move test that depends on the X86 backend into the right subdirectory.
llvm-svn: 182834
2013-05-29 08:40:49 +00:00
Patrik Hagglund ae8faf2e9a Temporary fix to get rid of gcc warning.
llvm-svn: 182832
2013-05-29 07:32:08 +00:00
Evgeniy Stepanov 0209f29528 Allow overriding the location of C/C++ compilers in Android CMake build.
Patch by Greg Fitzgerald.

llvm-svn: 182831
2013-05-29 07:23:20 +00:00
Rui Ueyama 81247063bf [WinLink] Add -subsystem and -out command line option parsing.
The code to actually consume these flags will be added soon.

llvm-svn: 182824
2013-05-29 05:07:49 +00:00
Rafael Espindola ecf63c6833 Don't compute the visibility unless we really have to.
This brings the number of linkage computations in "clang -cc1" in SemaExpr.ii
from 58426 to 43134. With -emit-llvm the number goes from 161045 to 145461.

llvm-svn: 182823
2013-05-29 04:55:30 +00:00
Venkatraman Govindaraju ca0fe2f57e [Sparc] Add support for leaf functions in sparc backend.
llvm-svn: 182822
2013-05-29 04:46:31 +00:00
Jakob Stoklund Olesen d7bf293eb7 Fix bad indentation.
llvm-svn: 182821
2013-05-29 03:57:23 +00:00
NAKAMURA Takumi d11b42aaad LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of StringRef.
llvm-svn: 182820
2013-05-29 03:13:47 +00:00
NAKAMURA Takumi d57ea87080 Whitespace.
llvm-svn: 182819
2013-05-29 03:13:41 +00:00
Rafael Espindola 7dcb52eed7 Add a testcase from pr16059.
It was fixed back in r182750, but this is a nice testcase to have.

llvm-svn: 182818
2013-05-29 03:10:01 +00:00
David Blaikie c4fe5db111 Debug Info: Update documentation to match recent (& not so recent) schema changes
This updates the debug info metadata schema documentation for various
schema changes made recently surrounding filename information for
scopes and the representation of imported entities.

llvm-svn: 182817
2013-05-29 02:05:13 +00:00
David Blaikie d105e4e08c Debug Info: Reorder accessor to match field order.
llvm-svn: 182816
2013-05-29 02:05:07 +00:00
Andrew Kaylor 288ae669b4 Removing expected fail from another test that is now passing.
llvm-svn: 182815
2013-05-29 01:15:49 +00:00
David Majnemer 0ffa331789 Disallow extern decls of type void in C++ mode
C++ and C differ with respect to the handling of extern void
declarations. Enforce the C++ behavior in C++ mode.

llvm-svn: 182814
2013-05-29 00:56:45 +00:00
Andrew Kaylor 0e46dbd119 Removing expected failures for watchpoint tests which are now passing.
llvm-svn: 182813
2013-05-29 00:26:53 +00:00
Fariborz Jahanian 7325c27468 Objective-C [qoi]: Improve on diagnostic when a method used
in an @selector expression has no implementation.
// rdar://14002507

llvm-svn: 182812
2013-05-28 23:49:32 +00:00
Ted Kremenek 274429be76 Remove links to old checker builds.
llvm-svn: 182811
2013-05-28 23:30:24 +00:00
Anna Zaks 5416ab0156 [analyzer] Use the expression’s type instead of region’s type in ArrayToPointer decay evaluation
This gives slightly better precision, specifically, in cases where a non-typed region represents the array
or when the type is a non-array type, which can happen when an array is a result of a reinterpret_cast.

llvm-svn: 182810
2013-05-28 23:24:01 +00:00
Andrew Kaylor 93132f504f Adding support for stopping all threads of multithreaded inferiors on Linux. Also adding multithreaded test cases.
llvm-svn: 182809
2013-05-28 23:04:25 +00:00
Anna Zaks 6477e97af7 [analyzer] Re-enable reasoning about CK_LValueBitCast
It’s important for us to reason about the cast as it is used in std::addressof. The reason we did not
handle the cast previously was a crash on a test case (see commit r157478). The crash was in
processing array to pointer decay when the region type was not an array. Address the issue, by
just returning an unknown in that case.

llvm-svn: 182808
2013-05-28 22:32:08 +00:00
Jack Carter 0259300325 Mips assembler: Improve set register alias handling
This patch solves the problem of numeric register values not being accepted:

../set_alias.s:1:11: error: expected valid expression after comma
        .set    r4,$4
                    ^
The parsing of .set directive is changed and handling of symbols in code 
as well to enable this feature. 

The test example is added.

Patch by Vladimir Medic

llvm-svn: 182807
2013-05-28 22:21:05 +00:00
Daniel Malea bb43721a35 Fixed continue issues with process attach/detach
- added code for tracking transition from eStateAttaching to eStateStopped in event listener and handling process continuation there.

Patch by Arthur Evstifeev!

llvm-svn: 182806
2013-05-28 21:27:03 +00:00
Tim Northover 8a1aa518a3 AArch64: clarify -help message
llvm-svn: 182804
2013-05-28 21:09:39 +00:00
Simon Atanasyan 6fc9f4e299 [Mips] Add Mips specific dynamic table entry tags.
llvm-svn: 182803
2013-05-28 20:48:56 +00:00
Paul Redmond 5fdf836ba4 Add support for llvm.vectorizer metadata
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic
  by making the root of additional loop metadata.
  - Loop::isAnnotatedParallel now looks for llvm.loop and associated
    llvm.mem.parallel_loop_access
  - document llvm.loop and update llvm.mem.parallel_loop_access
- add support for llvm.vectorizer.width and llvm.vectorizer.unroll
  - document llvm.vectorizer.* metadata
  - add utility class LoopVectorizerHints for getting/setting loop metadata
  - use llvm.vectorizer.width=1 to indicate already vectorized instead of
    already_vectorized
- update existing tests that used llvm.loop.parallel and
  llvm.vectorizer.already_vectorized

Reviewed by: Nadav Rotem

llvm-svn: 182802
2013-05-28 20:00:34 +00:00
Michael Gottesman 9d406f4ec7 [APInt] Implement tcDecrement as a counterpart to tcIncrement. This is for use in APFloat IEEE-754R 2008 nextUp/nextDown function.
rdar://13852078

llvm-svn: 182801
2013-05-28 19:50:20 +00:00
Tim Northover 3b684d8359 ARM: use pristine object file while processing relocations
Previously we would read-modify-write the target bits when processing
relocations for the MCJIT. This had the problem that when relocations
were processed multiple times for the same object file (as they can
be), the result is not idempotent and the values became corrupted.

The solution to this is to take any bits used in the destination from
the pristine object file as LLVM emitted it.

This should fix PR16013 and remote MCJIT on ARM ELF targets.

llvm-svn: 182800
2013-05-28 19:48:19 +00:00
Rafael Espindola 9551d3bad9 Check the linkage cache at every recursive step.
Before this patch the linkage cache was only used by the entry level function
(getLinkage). The function that does the actual computation (getLVForDecl),
never looked at it.

This means that we would not reuse an entry in the cache when getLVForDecl did
a recursive call. This patch fixes that by adding another computation enum
value for when we don't care about the linkage at all and having getLVForDecl
check the cache in that case.

When running "clang -cc1" over SemaExpr.ii this brings the number of linkage
computations from 93749 to 58426. When running "clang -cc1 -emit-llvm -O3" it
goes from 198708 to 161444.

For SemaExpr.ii at least linkage computation is a small enough percentage of
the work that the time difference was in the noise.

When asserts are enabled this patch also causes clang to check the linkage
cache even on recursive calls.

llvm-svn: 182799
2013-05-28 19:43:11 +00:00