Commit Graph

152325 Commits

Author SHA1 Message Date
Kostya Serebryany 6a068a715d [asan] initialize fake_stack lazily and increase its maximal size. This makes -fsanitize=address,use-after-return more robust: all SPEC tests pass now. In the default mode thread stacks become a bit smaller.
llvm-svn: 184934
2013-06-26 12:16:05 +00:00
Elena Demikhovsky fed077be03 Fixed a comment.
llvm-svn: 184933
2013-06-26 12:15:53 +00:00
NAKAMURA Takumi 1c9de1f078 Suppress llvm/test/Other/can-execute.txt on msys bash.
llvm-svn: 184932
2013-06-26 10:56:44 +00:00
Elena Demikhovsky 6769c50d9e Optimized integer vector multiplication operation by replacing it with shift/xor/sub when it is possible. Fixed a bug in SDIV, where the const operand is not a splat constant vector.
llvm-svn: 184931
2013-06-26 10:55:03 +00:00
NAKAMURA Takumi 8e85e6a919 clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separator on MSYS bash.exe, since r184774.
$ bin/clang.exe -print-file-name=include
    e:/path/to/build/bin\..\lib\clang\3.4\include

llvm-svn: 184930
2013-06-26 10:45:20 +00:00
Chandler Carruth fc9d259c98 Revert the Darwin half of r184805: "Remove the sysroot (or isysroot)
restriction from the GCDAProfile.c"

Bill added a much more effective way of coping with the use of errno and
other system interactions for Darwin for now by disabling it on that
platform. Building against the SDK stuff is more fundamental to the
darwin build process.

llvm-svn: 184929
2013-06-26 10:05:37 +00:00
Kostya Serebryany 5e276f9dbc [asan] workaround for PR16277: don't instrument AllocaInstr with alignment more than the redzone size
llvm-svn: 184928
2013-06-26 09:49:52 +00:00
Kostya Serebryany 9f5213f20f [asan] add option -asan-keep-uninstrumented-functions
llvm-svn: 184927
2013-06-26 09:18:17 +00:00
Evgeniy Stepanov b598c0b527 [sanitizer] Reformat line >80 chars.
llvm-svn: 184926
2013-06-26 09:16:45 +00:00
Evgeniy Stepanov 2c7d4d379e [sanitizer] Fix build with OSS4 kernel headers.
This fixes PR16453.

llvm-svn: 184925
2013-06-26 08:16:38 +00:00
Andy Gibbs 3ef5ed1ec0 Provide bootstrap support to build only llvm+clang when using cmake.
Where a source tree is complete with lld, lldb and polly, it may not be possible to use cmake to configure build scripts if the host compiler it not capable of compiling these sub-projects.  This change makes it possible to first build a bootstrap clang compiler when can then be used to build a complete llvm toolchain.  An example bootstrap build sequence could be as follows:

$ mkdir bootstrap
$ cd bootstrap
$ cmake -G 'Unix Makefiles'
        -DCMAKE_BUILD_TYPE:STRING=Release
        -DCMAKE_PREFIX_PATH:STRING=$(pwd)
        -DLLVM_TARGETS_TO_BUILD:STRING=host
        -DLLVM_INCLUDE_TOOLS:STRING=bootstrap-only
        ../source
$ make clang  # build clang only for host

$ cd ..
$ export CC=$(realpath bootstrap/bin)/clang
$ export CXX=$(realpath bootstrap/bin)/clang++

$ mkdir final
$ cd final
$ cmake -G 'Unix Makefiles' ../source
$ make all check-all

llvm-svn: 184924
2013-06-26 08:05:08 +00:00
Andy Gibbs f5dede1beb Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake.
llvm-svn: 184923
2013-06-26 07:57:53 +00:00
Rafael Espindola a9b6429ec8 Remove unused include.
llvm-svn: 184922
2013-06-26 06:15:57 +00:00
Rafael Espindola 4168ee73a4 Remove more uses of llvm::sys::Path.
llvm-svn: 184921
2013-06-26 06:13:06 +00:00
Rafael Espindola 2c6f4fea82 Remove calls to Path in #ifdefs that don't seem to be used in any of the bots :-(
llvm-svn: 184920
2013-06-26 06:10:32 +00:00
Rafael Espindola d4aca65172 Add a simpler version of remove_all.
llvm-svn: 184919
2013-06-26 06:06:54 +00:00
Rafael Espindola 380988340c Remove PathV1.h from CompilerInvocation.cpp.
llvm-svn: 184918
2013-06-26 05:40:30 +00:00
Rafael Espindola 4601c462a7 Fix the build when __APPLE__ is defined.
llvm-svn: 184917
2013-06-26 05:25:44 +00:00
Rafael Espindola 4b304b0abf Remove sys::GetMainExecutable.
llvm-svn: 184916
2013-06-26 05:05:37 +00:00
Rafael Espindola 9678d27140 Use llvm::sys::fs::getMainExecutable.
llvm-svn: 184915
2013-06-26 05:03:40 +00:00
Rafael Espindola e03dfd9b0a Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit.

llvm-svn: 184914
2013-06-26 05:01:35 +00:00
Rafael Espindola 399ab33a37 Remove PathV1.h from CompilerInstance.cpp.
llvm-svn: 184913
2013-06-26 04:32:59 +00:00
Rafael Espindola f5e5bc4703 Don't use PathV1.h in ASTUnit.cpp.
llvm-svn: 184912
2013-06-26 04:26:38 +00:00
Rafael Espindola 93079d589c Remove forward declarations of sys::Path.
llvm-svn: 184911
2013-06-26 04:23:08 +00:00
Rafael Espindola 00efef2835 Remove PathWithStatus.
llvm-svn: 184910
2013-06-26 04:15:55 +00:00
Rafael Espindola a96bd562c2 Remove the last use of PathWithStatus.
llvm-svn: 184909
2013-06-26 04:12:57 +00:00
Rafael Espindola bc4aa5547e Use llvm::sys::fs::unique_file.
llvm-svn: 184908
2013-06-26 04:02:37 +00:00
Rafael Espindola bc7d949b32 Remove some uses of llvm::sys::Path.
llvm-svn: 184907
2013-06-26 03:52:38 +00:00
Rafael Espindola 76565f08f7 Remove PathV1.h use from WindowsToolChain.cpp.
llvm-svn: 184906
2013-06-26 03:39:10 +00:00
Nico Weber f579ab302a Fix a comment.
llvm-svn: 184905
2013-06-26 02:42:46 +00:00
Richard Smith 68ad0e7154 Lazily deserialize the "first' friend declaration when deserializing a class
declaration. This PCH a little lazier, and breaks a deserialization cycle that
causes crashes with modules enabled.

llvm-svn: 184904
2013-06-26 02:41:25 +00:00
Faisal Vali 18d3598ed0 Fix PCH bug with member templates of local classes in nontemplate functions.
As noted by Richard in the post:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130624/082605.html, the following code should not add an entry
into PendingLocalImplicitInstantiations, since local instantiations
should only occur within the context of other instantiations:

int foo(double y) {
   struct Lambda {
      template<class T> T operator()(T t) const { return t; };
   } lambda;
   return lambda(y);
}

Hence the attached code does the following:
  1) In MarkFunctionReferenced, check if ActiveInstantiations.size() 
      is non-zero before adding to PendingLocalImplicitInstantiations.
  2) In InstantiateFunctionDefinition, we swap out/in
      PendingLocalImplicitInstantiations so that only those 
      pending local instantiations that are added during the instantiation
      of the current function are instantiated recursively.

llvm-svn: 184903
2013-06-26 02:34:24 +00:00
Rafael Espindola 358256c77a Remove PathV1.h usage from ToolChains.cpp.
llvm-svn: 184902
2013-06-26 02:13:00 +00:00
Jason Molenda bd4dfade51 Remove ifdef LLDB_CONFIGURATION_DEBUG directives around the formatter
cache ivars/methods.

llvm-svn: 184901
2013-06-26 01:51:03 +00:00
Enrico Granata c2a96407c5 Remove the #define USE_CACHE since the formatters cache has been operational for a while now and has not caused issues that warrant disabling it
Also, print the cache hits statistics if the log is in debugging mode vs. LLDB being a debug build - this should make it easier to gather useful metrics on cache success rate for real users

llvm-svn: 184900
2013-06-26 01:03:38 +00:00
Enrico Granata 15571f1571 <rdar://problem/14266578>
"command source" was not properly setting the stop-on-error option

llvm-svn: 184899
2013-06-26 00:36:27 +00:00
Enrico Granata fb1d9fe15e <rdar://problem/14243761>
The argument to -w (--category) in type * list is a regular expression
This caused unhappiness with the gnu-libstdc++ category because of the double ++

Now we check for exact textual match as-well-as regexp matching

llvm-svn: 184898
2013-06-26 00:31:21 +00:00
Nick Lewycky 5cd9538b90 dbgs() << Instruction doesn't print a newline on the end any more. Update these
debug statements to add a missing newline. Also canonicalize to '\n' instead of
"\n"; the latter calls a function with a loop the former does not.

llvm-svn: 184897
2013-06-26 00:30:18 +00:00
Nico Weber 9096fc0dab Run clang-format on lib/Format code after r184894. No other changes.
llvm-svn: 184896
2013-06-26 00:30:14 +00:00
Chandler Carruth fa95cc916f Fix a use after free I introduced and that Bill caught in code review
(thanks!) by deferring the free of the filename until we finish writing
the coverage data to that file.

Bill, let me know if you'd prefer a different approach!

llvm-svn: 184895
2013-06-26 00:26:16 +00:00
Nico Weber 8084cffd0b Formatter: Don't put a space after parameter-naming block comments.
Before: f(a, b, /*doFoo=*/ false);
Now: f(a, b, /*doFoo=*/false);

This style is a lot more common:
$ ack -H '=\*\/\w' lib | wc -l 
    1281
$ ack -H '=\*\/ \w' lib | wc -l 
      70

llvm-svn: 184894
2013-06-26 00:15:19 +00:00
Enrico Granata b4675a4e12 <rdar://problem/14266411>
The semi-unofficial way of returning a status from a Python command was to return a string (e.g. return "no such variable was found") that LLDB would pick as a clue of an error having happened

This checkin changes that:
- SBCommandReturnObject now exports a SetError() call, which can take an SBError or a plain C-string
- script commands now drop any return value and expect the SBCommandReturnObject ("return object") to be filled in appropriately - if you do nothing, a success will be assumed

If your commands were relying on returning a value and having LLDB pick that up as an error, please change your commands to SetError() through the return object or expect changes in behavior

llvm-svn: 184893
2013-06-25 23:43:28 +00:00
Adrian Prantl cc077ad634 s/C++0x/C++11/
llvm-svn: 184892
2013-06-25 23:42:37 +00:00
Jakob Stoklund Olesen e22476a923 Merge isReachable into isBackedge.
Prefer using RPO.lookup() instead of RPO[] which can mutate the map.

llvm-svn: 184891
2013-06-25 23:32:10 +00:00
Nick Lewycky 7a2a4799d6 Don't check for triviality on fields of templated records. We can't know the
answer until after instantiation. Fixes PR16061!

llvm-svn: 184890
2013-06-25 23:22:23 +00:00
David Majnemer 502b0ed264 Implement DR136
Friend declarations that specify a default argument must be a definition
and the only declaration in the translation unit.

llvm-svn: 184889
2013-06-25 23:09:30 +00:00
Nadav Rotem 0794acc1da SLPVectorizer: support slp-vectorization of PHINodes between basic blocks
llvm-svn: 184888
2013-06-25 23:04:09 +00:00
Richard Smith 71bdbb0101 Make this test properly test both things it's trying to test.
llvm-svn: 184887
2013-06-25 22:37:05 +00:00
Sean Callanan 6b2f22de5e Fixed a bug in ClangASTSource where we would return
the target of a typedef when asked for a typedef.

llvm-svn: 184886
2013-06-25 22:36:17 +00:00
Richard Smith ffe9da0136 Missing test update from r184884.
llvm-svn: 184885
2013-06-25 22:22:42 +00:00