platform/upstream/llvm.git
11 years agoConvert HowToReleaseLLVM.html to reST
Dmitri Gribenko [Fri, 7 Dec 2012 16:42:48 +0000 (16:42 +0000)]
Convert HowToReleaseLLVM.html to reST

Patch by Alexander Zinenko.

llvm-svn: 169608

11 years agotsan: fix pipe interceptors and add 2 tests
Dmitry Vyukov [Fri, 7 Dec 2012 16:22:54 +0000 (16:22 +0000)]
tsan: fix pipe interceptors and add 2 tests

llvm-svn: 169607

11 years agotsan: fix lint warnings
Dmitry Vyukov [Fri, 7 Dec 2012 16:20:06 +0000 (16:20 +0000)]
tsan: fix lint warnings

llvm-svn: 169606

11 years agoClang-format: extracted FormatTokenSource from UnwrappedLineParser.
Alexander Kornienko [Fri, 7 Dec 2012 16:15:44 +0000 (16:15 +0000)]
Clang-format: extracted FormatTokenSource from UnwrappedLineParser.

Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D186

llvm-svn: 169605

11 years agoThe test unconditionally assumes a particular cpu has a backend build in the target.
David Tweed [Fri, 7 Dec 2012 15:57:45 +0000 (15:57 +0000)]
The test unconditionally assumes a particular cpu has a backend build in the target.
Buildbots for some hosts may choose to build only their own backend in order to
maximise testing-turnaround time. Move the test into a prefixed directory so
lit's standard "backend specific" suppression can be done.

llvm-svn: 169604

11 years agoSplit MCELFStreamer into a header file.
Logan Chien [Fri, 7 Dec 2012 15:50:40 +0000 (15:50 +0000)]
Split MCELFStreamer into a header file.

llvm-svn: 169603

11 years agotsan: add pipe interceptors
Dmitry Vyukov [Fri, 7 Dec 2012 15:32:56 +0000 (15:32 +0000)]
tsan: add pipe interceptors

llvm-svn: 169602

11 years ago[asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names...
Kostya Serebryany [Fri, 7 Dec 2012 15:15:01 +0000 (15:15 +0000)]
[asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names (if non-empty) in asan reports

llvm-svn: 169601

11 years agotsan: refactoring is preparation to more precise fd synchronization handling
Dmitry Vyukov [Fri, 7 Dec 2012 14:40:10 +0000 (14:40 +0000)]
tsan: refactoring is preparation to more precise fd synchronization handling

llvm-svn: 169600

11 years agoHexagon TC: add cc1 defaults for hexagon-gcc
Matthew Curtis [Fri, 7 Dec 2012 13:52:44 +0000 (13:52 +0000)]
Hexagon TC: add cc1 defaults for hexagon-gcc
 compatibility

llvm-svn: 169599

11 years ago[sanitizer] implement SanitizerSetThreadName/SanitizerGetThreadName. Just for linux...
Kostya Serebryany [Fri, 7 Dec 2012 11:27:24 +0000 (11:27 +0000)]
[sanitizer] implement SanitizerSetThreadName/SanitizerGetThreadName. Just for linux so far (using prctl(PR_GET_NAME))

llvm-svn: 169598

11 years agoSwitch to r83 of cpplint.
Evgeniy Stepanov [Fri, 7 Dec 2012 11:00:14 +0000 (11:00 +0000)]
Switch to r83 of cpplint.

Ubuntu Precise compatibility.

llvm-svn: 169597

11 years agodocs: Convert LangRef to reST.
Sean Silva [Fri, 7 Dec 2012 10:36:55 +0000 (10:36 +0000)]
docs: Convert LangRef to reST.

NOTE: If you have any patches in the works that modify LangRef, you will
need to rewrite the changes to LangRef.html to their equivalents in
LangRef.rst. If you need assistance feel free to contact me.

Since LangRef is mission-critical for the project and "normative", I
have taken extra care to ensure that no content was lost or altered in
the conversion. The content was converted with a tool called `pandoc`,
so there is no chance for a human error like accidentally forgetting a
sentence or whatever. After the initial conversion by `pandoc`, only
changes to the markup were done.

This is just the most literal conversion of the HTML document as
possible. It might be worth exploring some way to chop up this massive
document into separate pages, e.g. something like
`docs/LangRef/Instructions.rst`, `docs/LangRef/Intrinsics.rst`, etc.
with `docs/LangRef.rst` being an "intro/navigation page" of sorts. On
the other hand, that loses the ability to {Ctrl,Cmd}-F for a given term
right from your browser.

IMO, I think our stylesheet needs some work because I find it hard to
tell what level of nesting some of the headings are at (e.g. "is this a
new section or is it a subsection?"). The issue is present on other
pages, but the sheer size and deep section structure of LangRef really
brings this issue out. If there are any web designers out there in the
community it would be awesome if you tried to come up with something
nicer.

llvm-svn: 169596

11 years ago[sanitizer] try not to use libc mem* functions in sanitizer_common tests (conflicts...
Kostya Serebryany [Fri, 7 Dec 2012 10:13:10 +0000 (10:13 +0000)]
[sanitizer] try not to use libc mem* functions in sanitizer_common tests (conflicts with our own interceptors)

llvm-svn: 169595

11 years agoSmall tweaks to clang-format.
Daniel Jasper [Fri, 7 Dec 2012 09:52:15 +0000 (09:52 +0000)]
Small tweaks to clang-format.

Now not joining keywords with '::' and not putting a space between
a pointer pointer.

llvm-svn: 169594

11 years ago[sanitizer] fix the build on ancient gcc which has stricter rules about what can...
Kostya Serebryany [Fri, 7 Dec 2012 09:40:17 +0000 (09:40 +0000)]
[sanitizer] fix the build on ancient gcc which has stricter rules about what can be put on TLS. Long term, we absolutely must build the run-times with the fresh target clang

llvm-svn: 169593

11 years agotsan: deflake output tests (by increasing sleeps)
Dmitry Vyukov [Fri, 7 Dec 2012 09:24:57 +0000 (09:24 +0000)]
tsan: deflake output tests (by increasing sleeps)

llvm-svn: 169592

11 years ago[msan] Remove readonly/readnone attributes from all called functions.
Evgeniy Stepanov [Fri, 7 Dec 2012 09:08:32 +0000 (09:08 +0000)]
[msan] Remove readonly/readnone attributes from all called functions.

MSan uses a TLS slot to pass shadow for function arguments and return values.
This makes all instrumented functions not readonly, and at the same time
requires that all callees of an instrumented function that may be
MSan-instrumented do not have readonly attribute (otherwise some of the
instrumentation may be optimized out).

llvm-svn: 169591

11 years agoCache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().
Ted Kremenek [Fri, 7 Dec 2012 07:30:19 +0000 (07:30 +0000)]
Cache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().

The same queries can happen thousands of times.  This reduces the analysis
time on one heavy Objective-C file by 2.4%.

llvm-svn: 169589

11 years agoFix the required args count for variadic blocks.
John McCall [Fri, 7 Dec 2012 07:03:17 +0000 (07:03 +0000)]
Fix the required args count for variadic blocks.

We were emitting calls to blocks as if all arguments were
required --- i.e. with signature (A,B,C,D,...) rather than
(A,B,...).  This patch fixes that and accounts for the
implicit block-context argument as a required argument.
In addition, this patch changes the function type under which
we call unprototyped functions on platforms like x86-64 that
guarantee compatibility of variadic functions with unprototyped
function types;  previously we would always call such functions
under the LLVM type T (...)*, but now we will call them under
the type T (A,B,C,D,...)*.  This last change should have no
material effect except for making the type conventions more
explicit;  it was a side-effect of the most convenient implementation.

llvm-svn: 169588

11 years agoclang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit triple.
NAKAMURA Takumi [Fri, 7 Dec 2012 06:57:40 +0000 (06:57 +0000)]
clang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit triple.

llvm-svn: 169587

11 years agoFurther reduce analysis time by 0.2% on a heavy Objective-C example by avoiding over...
Ted Kremenek [Fri, 7 Dec 2012 06:49:27 +0000 (06:49 +0000)]
Further reduce analysis time by 0.2% on a heavy Objective-C example by avoiding over-eager canonicalization of clusters.

llvm-svn: 169586

11 years agoUse the new MIBundleBuilder class in the Mips target.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:40 +0000 (04:23 +0000)]
Use the new MIBundleBuilder class in the Mips target.

This is the preferred way of creating bundled machine instructions.

llvm-svn: 169585

11 years agoAdd an MIBundleBuilder class.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:35 +0000 (04:23 +0000)]
Add an MIBundleBuilder class.

Like the MachineInstrBuilder, this class makes it easier to build
bundles of MachineInstrs.

llvm-svn: 169584

11 years agoAdd higher-level API for dealing with bundled MachineInstrs.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:29 +0000 (04:23 +0000)]
Add higher-level API for dealing with bundled MachineInstrs.

This is still a work in progress. The purpose is to make bundling and
unbundling operations explicit, and to catch errors where bundles are
broken or created inadvertently.

The old IsInsideBundle flag is replaced by two MI flags: BundledPred
which has the same meaning as IsInsideBundle, and BundledSucc which is
set on instructions that are bundled with a successor. Having two flags
provdes redundancy to detect when a bundle is inadvertently torn by a
splice() or insert(), and it makes it possible to write bundle iterators
that don't need to peek at adjacent instructions.

The new flags can't be manipulated directly (once setIsInsideBundle is
gone). Instead there are MI functions to make and break bundle bonds.

The setIsInsideBundle function will be removed in a future commit. It
should be replaced by bundleWithPred().

llvm-svn: 169583

11 years ago<rdar://problem/12831670>
Jason Molenda [Fri, 7 Dec 2012 03:38:23 +0000 (03:38 +0000)]
<rdar://problem/12831670>
When using the same-device optimization for shared cache libraries, if
we have an invalid load address for __LINKEDIT, don't try to read
anything out of lldb's own address space.  Reading it out of the remote
address space will fail gracefully if we have bad addresses but reading
it out of lldb's own address space will result in a crash.

llvm-svn: 169582

11 years agoUnbreak the GCC (4.4 & other bot) builds from r169571.
David Blaikie [Fri, 7 Dec 2012 03:28:20 +0000 (03:28 +0000)]
Unbreak the GCC (4.4 & other bot) builds from r169571.

llvm-svn: 169581

11 years ago[mips] Delete nodes and instructions for dynamic alloca that are no longer in
Akira Hatanaka [Fri, 7 Dec 2012 03:10:18 +0000 (03:10 +0000)]
[mips] Delete nodes and instructions for dynamic alloca that are no longer in
use.

llvm-svn: 169580

11 years ago[mips] Shorten predicate name.
Akira Hatanaka [Fri, 7 Dec 2012 03:06:09 +0000 (03:06 +0000)]
[mips] Shorten predicate name.

llvm-svn: 169579

11 years ago[mips] Delete unused sub-target features.
Akira Hatanaka [Fri, 7 Dec 2012 03:04:05 +0000 (03:04 +0000)]
[mips] Delete unused sub-target features.

llvm-svn: 169578

11 years ago[mips] Remove unnecessary predicates.
Akira Hatanaka [Fri, 7 Dec 2012 03:01:24 +0000 (03:01 +0000)]
[mips] Remove unnecessary predicates.

llvm-svn: 169577

11 years agoAdd file missed from r169574!
Richard Smith [Fri, 7 Dec 2012 02:26:01 +0000 (02:26 +0000)]
Add file missed from r169574!

llvm-svn: 169576

11 years agoarcconfig for compiler-rt
Alexey Samsonov [Fri, 7 Dec 2012 02:11:47 +0000 (02:11 +0000)]
arcconfig for compiler-rt

llvm-svn: 169575

11 years agoPer [dcl.fct.def.default]p1, don't allow variadic special members to be defaulted.
Richard Smith [Fri, 7 Dec 2012 02:10:28 +0000 (02:10 +0000)]
Per [dcl.fct.def.default]p1, don't allow variadic special members to be defaulted.

llvm-svn: 169574

11 years agoAdd support to ValueTracking for determining that a pointer is non-null
Chandler Carruth [Fri, 7 Dec 2012 02:08:58 +0000 (02:08 +0000)]
Add support to ValueTracking for determining that a pointer is non-null
by virtue of inbounds GEPs that preclude a null pointer.

This is a very common pattern in the code generated by std::vector and
other standard library routines which use allocators that test for null
pervasively. This is one step closer to teaching Clang+LLVM to be able
to produce an empty function for:

  void f() {
    std::vector<int> v;
    v.push_back(1);
    v.push_back(2);
    v.push_back(3);
    v.push_back(4);
  }

Which is related to getting them to completely fold SmallVector
push_back sequences into constants when inlining and other optimizations
make that a possibility.

llvm-svn: 169573

11 years agoAdd manualRetain() and manualRelease() to ImmutableMapRef, and add a new constructor.
Ted Kremenek [Fri, 7 Dec 2012 02:03:00 +0000 (02:03 +0000)]
Add manualRetain() and manualRelease() to ImmutableMapRef, and add a new constructor.

llvm-svn: 169572

11 years agoChange RegionStore to always use ImmutableMapRef for processing cluster bindings.
Ted Kremenek [Fri, 7 Dec 2012 01:55:21 +0000 (01:55 +0000)]
Change RegionStore to always use ImmutableMapRef for processing cluster bindings.

This reduces analysis time by 1.2% on one test case (Objective-C), but
also cleans up some of the code conceptually as well.  We can possible
just make RegionBindingsRef -> RegionBindings, but I wanted to stage
things.

After this, we should revisit Jordan's optimization of not canonicalizing
the immutable AVL trees for the cluster bindings as well.

llvm-svn: 169571

11 years ago[analyzer] Remove possible pessimizations from r169563.
Jordan Rose [Fri, 7 Dec 2012 01:54:38 +0000 (01:54 +0000)]
[analyzer] Remove possible pessimizations from r169563.

Thanks for reminding me about copy-elision, David. Passing references here
doesn't help when we could get move construction in C++11. If we really
cared, we'd use std::swap to steal the reference from the temporary arg,
but it's probably not /that/ critical outside of Profile anyway.

llvm-svn: 169570

11 years agoMakefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide...
NAKAMURA Takumi [Fri, 7 Dec 2012 01:43:23 +0000 (01:43 +0000)]
Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables .

llvm-svn: 169569

11 years agounittest/googletest/Makefile: Unbreak out-of-tree build.
NAKAMURA Takumi [Fri, 7 Dec 2012 01:25:45 +0000 (01:25 +0000)]
unittest/googletest/Makefile: Unbreak out-of-tree build.

  - Use SOURCES instead of Source. See Makefile.rules and MakefileGuide.html.
  - Don't assume the current directory. $(wildcard *.cc) doesn't match anything on corresponding build directory.

llvm-svn: 169568

11 years ago<rdar://problem/8908550>
Greg Clayton [Fri, 7 Dec 2012 00:19:47 +0000 (00:19 +0000)]
<rdar://problem/8908550>

Added "--address" as an available option for "source list".

llvm-svn: 169567

11 years agotest/Index/skip-parsed-bodies/compile_commands.json: Remove XFAIL on cygming.
NAKAMURA Takumi [Fri, 7 Dec 2012 00:05:36 +0000 (00:05 +0000)]
test/Index/skip-parsed-bodies/compile_commands.json: Remove XFAIL on cygming.

llvm-svn: 169566

11 years agoAdd convenience accessor to Triple for OS == NaCl
Eli Bendersky [Fri, 7 Dec 2012 00:01:53 +0000 (00:01 +0000)]
Add convenience accessor to Triple for OS == NaCl

llvm-svn: 169565

11 years agoTry to unbreak makefile build by excluding gtest-all.cc source
Alexey Samsonov [Thu, 6 Dec 2012 23:59:54 +0000 (23:59 +0000)]
Try to unbreak makefile build by excluding gtest-all.cc source

llvm-svn: 169564

11 years ago[analyzer] Avoid ProgramStateRef copy constructors.
Jordan Rose [Thu, 6 Dec 2012 23:55:34 +0000 (23:55 +0000)]
[analyzer] Avoid ProgramStateRef copy constructors.

Suggested by David Blaikie. ExplodedNode, CallEvent, and CheckerContext all
hang onto their ProgramState, so the accessors can return a reference to the
internal state rather than preemptively copying it. This helps avoid
temporary ProgramStateRefs, though local variables will still (correctly)
do an extra retain and release.

llvm-svn: 169563

11 years agoRevert r169557. It seems that the test is too restricted
Logan Chien [Thu, 6 Dec 2012 23:40:31 +0000 (23:40 +0000)]
Revert r169557.  It seems that the test is too restricted
and will break the build on buildbot.

llvm-svn: 169562

11 years agoAdd a 'using' declaration to suppress GCC's -Woverloaded-virtual while we
Matt Beaumont-Gay [Thu, 6 Dec 2012 23:15:36 +0000 (23:15 +0000)]
Add a 'using' declaration to suppress GCC's -Woverloaded-virtual while we
decide what pattern we want to follow in the future.

llvm-svn: 169561

11 years ago<rdar://problem/12827789>
Greg Clayton [Thu, 6 Dec 2012 23:12:53 +0000 (23:12 +0000)]
<rdar://problem/12827789>

Be sure to load dSYM files when the object file is in memory only.

llvm-svn: 169560

11 years agoModify the LLVM checkout of googletest:
Alexey Samsonov [Thu, 6 Dec 2012 23:04:41 +0000 (23:04 +0000)]
Modify the LLVM checkout of googletest:
1) don't delete gtest-all.cc (which is used to gather all gtest source
   files in a single file)
2) make including LLVMSupport headers optional (on by default).
   Sanitizer tools may want to use their own versions of googletest
   compiled with specific flags, instead of the common googletest
   library used for all other LLVM/Clang unittests.

llvm-svn: 169559

11 years ago[libclang] Add a test to make sure we skip bodies properly from "#pragma once" headers.
Argyrios Kyrtzidis [Thu, 6 Dec 2012 23:04:24 +0000 (23:04 +0000)]
[libclang] Add a test to make sure we skip bodies properly from "#pragma once" headers.

llvm-svn: 169558

11 years agoAdd i686-linux-android for gcc toolchain detection.
Logan Chien [Thu, 6 Dec 2012 22:59:37 +0000 (22:59 +0000)]
Add i686-linux-android for gcc toolchain detection.

* Look for i686-linux-android under <sysroot>/lib/gcc.

* This patch also slightly enhance the test suite for
  Android GCC toolchain detection.

llvm-svn: 169557

11 years ago<rdar://problem/12820334>
Greg Clayton [Thu, 6 Dec 2012 22:49:16 +0000 (22:49 +0000)]
<rdar://problem/12820334>

I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like:

memory read <addr> [<end-addr>]
memory write <addr>
breakpoint set --address <addr>
disassemble --start-address <addr> --end-address <addr>

It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers.

llvm-svn: 169556

11 years agoAdd extra truthiness.
Richard Smith [Thu, 6 Dec 2012 22:40:09 +0000 (22:40 +0000)]
Add extra truthiness.

llvm-svn: 169555

11 years agoFixes Makefile for Format unit tests.
Fariborz Jahanian [Thu, 6 Dec 2012 22:29:01 +0000 (22:29 +0000)]
Fixes Makefile for Format unit tests.

llvm-svn: 169554

11 years agofixed valgrind issues of prior commit, this change applies r169456 changes back to...
Pedro Artigas [Thu, 6 Dec 2012 22:12:44 +0000 (22:12 +0000)]
fixed valgrind issues of prior commit, this change applies r169456 changes back to the tree with fixes. on darwin no valgrind issues exist in the tests that used to fail.

original change description:

change MCContext to work on the doInitialization/doFinalization model

reviewed by Evan Cheng <evan.cheng@apple.com>

llvm-svn: 169553

11 years agoAdd examples of how to set env vars for the inferior process from lldb.
Jason Molenda [Thu, 6 Dec 2012 22:10:27 +0000 (22:10 +0000)]
Add examples of how to set env vars for the inferior process from lldb.

llvm-svn: 169552

11 years agoRemove unused field.
Jakub Staszak [Thu, 6 Dec 2012 22:08:59 +0000 (22:08 +0000)]
Remove unused field.

llvm-svn: 169551

11 years agoRemove trailing spaces.
Jakub Staszak [Thu, 6 Dec 2012 21:57:16 +0000 (21:57 +0000)]
Remove trailing spaces.

llvm-svn: 169550

11 years agoMark the "dwarf" version of the test expected fail as well as the dsym version.
Jim Ingham [Thu, 6 Dec 2012 21:40:51 +0000 (21:40 +0000)]
Mark the "dwarf" version of the test expected fail as well as the dsym version.

llvm-svn: 169549

11 years agohexagon-toolchain.c now passes on win32
Matthew Curtis [Thu, 6 Dec 2012 21:25:18 +0000 (21:25 +0000)]
hexagon-toolchain.c now passes on win32

llvm-svn: 169548

11 years agoFix typos in CHECK lines.
Dmitri Gribenko [Thu, 6 Dec 2012 21:24:47 +0000 (21:24 +0000)]
Fix typos in CHECK lines.

Patch by Alexander Zinenko.

llvm-svn: 169547

11 years agoDocumentation: fix typos and formatting.
Dmitri Gribenko [Thu, 6 Dec 2012 21:12:35 +0000 (21:12 +0000)]
Documentation: fix typos and formatting.

llvm-svn: 169546

11 years agorelax hexagon-toolchain.c even more to accomodate mingw32 targets
Matthew Curtis [Thu, 6 Dec 2012 20:55:41 +0000 (20:55 +0000)]
relax hexagon-toolchain.c even more to accomodate mingw32 targets

llvm-svn: 169544

11 years agorelax hexagon-toolchain.c CHECK to accomodate mingw32 targets
Matthew Curtis [Thu, 6 Dec 2012 20:21:20 +0000 (20:21 +0000)]
relax hexagon-toolchain.c CHECK to accomodate mingw32 targets

llvm-svn: 169543

11 years agoSimplify PDiag's move assignment overload a bit, the self-move check isn't actually...
Benjamin Kramer [Thu, 6 Dec 2012 20:12:03 +0000 (20:12 +0000)]
Simplify PDiag's move assignment overload a bit, the self-move check isn't actually necessary.

This just empties out the diag, which is fine.

llvm-svn: 169542

11 years agoRevert "Allow modifying an ImmutableMap without canonicalizing it immediately."
Ted Kremenek [Thu, 6 Dec 2012 19:41:30 +0000 (19:41 +0000)]
Revert "Allow modifying an ImmutableMap without canonicalizing it immediately."

Jordan and I discussed this, and we don't want this in the API.

llvm-svn: 169541

11 years agoMake sure to initialize the HasSkippedBody bit.
Argyrios Kyrtzidis [Thu, 6 Dec 2012 19:41:23 +0000 (19:41 +0000)]
Make sure to initialize the HasSkippedBody bit.

llvm-svn: 169540

11 years ago[libclang] Introduce a new indexing mode where we skip function bodies
Argyrios Kyrtzidis [Thu, 6 Dec 2012 19:41:16 +0000 (19:41 +0000)]
[libclang] Introduce a new indexing mode where we skip function bodies
that were already parsed in the same "indexing session".

An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.

If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.

llvm-svn: 169539

11 years agoRevert "[analyzer] Aggressively cut back on the canonicalization in RegionStore."
Ted Kremenek [Thu, 6 Dec 2012 19:40:32 +0000 (19:40 +0000)]
Revert "[analyzer] Aggressively cut back on the canonicalization in RegionStore."

Jordan and I discussed this, and we are going to do this another way.

llvm-svn: 169538

11 years agoReplace r169459 with something safer. Rather than having computeMaskedBits to
Evan Cheng [Thu, 6 Dec 2012 19:13:27 +0000 (19:13 +0000)]
Replace r169459 with something safer. Rather than having computeMaskedBits to
understand target implementation of any_extend / extload, just generate
zero_extend in place of any_extend for liveouts when the target knows the
zero_extend will be implicit (e.g. ARM ldrb / ldrh) or folded (e.g. x86 movz).

rdar://12771555

llvm-svn: 169536

11 years agoAdd move semantics to PartialDiagnostic, which can be very expensive to copy.
Benjamin Kramer [Thu, 6 Dec 2012 19:09:30 +0000 (19:09 +0000)]
Add move semantics to PartialDiagnostic, which can be very expensive to copy.

llvm-svn: 169535

11 years agoRemove unneeded function, since PR8156 was fixed over a year ago.
Jakub Staszak [Thu, 6 Dec 2012 19:05:46 +0000 (19:05 +0000)]
Remove unneeded function, since PR8156 was fixed over a year ago.

llvm-svn: 169534

11 years agoUn-XFAIL hexagon-toolchain.c test for mingw32
Matthew Curtis [Thu, 6 Dec 2012 19:03:09 +0000 (19:03 +0000)]
Un-XFAIL hexagon-toolchain.c test for mingw32

llvm-svn: 169533

11 years agoAllow modifying an ImmutableMap without canonicalizing it immediately.
Jordan Rose [Thu, 6 Dec 2012 19:01:24 +0000 (19:01 +0000)]
Allow modifying an ImmutableMap without canonicalizing it immediately.

This is an alternative to the ImmutableMapRef interface where a factory
should still be canonicalizing by default, but in certain cases an
improvement can be made by delaying the canonicalization.

llvm-svn: 169532

11 years agoAdd a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
Argyrios Kyrtzidis [Thu, 6 Dec 2012 18:59:10 +0000 (18:59 +0000)]
Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
that was skipped by the parser.

llvm-svn: 169531

11 years ago[analyzer] Remove isa<> followed by dyn_cast<>.
Jordan Rose [Thu, 6 Dec 2012 18:58:29 +0000 (18:58 +0000)]
[analyzer] Remove isa<> followed by dyn_cast<>.

llvm-svn: 169530

11 years ago[analyzer] Remove unused fields from ExprEngine.
Jordan Rose [Thu, 6 Dec 2012 18:58:26 +0000 (18:58 +0000)]
[analyzer] Remove unused fields from ExprEngine.

'currStmt', 'CleanedState', and 'EntryNode' were being set, but only ever
used locally.

llvm-svn: 169529

11 years ago[analyzer] Remove checks that predate the linearized CFG.
Jordan Rose [Thu, 6 Dec 2012 18:58:22 +0000 (18:58 +0000)]
[analyzer] Remove checks that predate the linearized CFG.

llvm-svn: 169528

11 years ago[analyzer] Simplify RetainCountChecker's handling of dead symbols.
Jordan Rose [Thu, 6 Dec 2012 18:58:18 +0000 (18:58 +0000)]
[analyzer] Simplify RetainCountChecker's handling of dead symbols.

Previously we made three passes over the set of dead symbols, and removed
them from the state /twice/. Now we combine the autorelease pass and the
symbol death pass, and only have to remove the bindings for the symbols
that leaked.

llvm-svn: 169527

11 years ago[analyzer] Use a smarter algorithm to find the last block in an inlined call.
Jordan Rose [Thu, 6 Dec 2012 18:58:15 +0000 (18:58 +0000)]
[analyzer] Use a smarter algorithm to find the last block in an inlined call.

Previously we would search for the last statement, then back up to the
entrance of the block that contained that statement. Now, while we're
scanning for the statement, we just keep track of which blocks are being
exited (in reverse order).

llvm-svn: 169526

11 years ago[analyzer] Speed up ExplodedNode::Profile by avoiding copy constructors.
Jordan Rose [Thu, 6 Dec 2012 18:58:12 +0000 (18:58 +0000)]
[analyzer] Speed up ExplodedNode::Profile by avoiding copy constructors.

ProgramStateRef::Retain isn't free!

llvm-svn: 169525

11 years ago[analyzer] Use optimized assumeDual for branches.
Jordan Rose [Thu, 6 Dec 2012 18:58:09 +0000 (18:58 +0000)]
[analyzer] Use optimized assumeDual for branches.

This doesn't seem to make much of a difference in practice, but it does
have the potential to avoid a trip through the constraint manager.

llvm-svn: 169524

11 years ago[analyzer] Aggressively cut back on the canonicalization in RegionStore.
Jordan Rose [Thu, 6 Dec 2012 18:58:06 +0000 (18:58 +0000)]
[analyzer] Aggressively cut back on the canonicalization in RegionStore.

Whenever we touch a single bindings cluster multiple times, we can delay
canonicalizing it until the final access. This has some interesting
implications, in particular that we shouldn't remove an /empty/ cluster
from the top-level map until canonicalization.

This is good for a 2% speedup or so on the test case in
<rdar://problem/12810842>

llvm-svn: 169523

11 years ago[analyzer] Remove bindExprAndLocation, which does extra work for no gain.
Jordan Rose [Thu, 6 Dec 2012 18:58:01 +0000 (18:58 +0000)]
[analyzer] Remove bindExprAndLocation, which does extra work for no gain.

This feature was probably intended to improve diagnostics, but was currently
only used when dumping the Environment. It shows what location a given value
was loaded from, e.g. when evaluating an LValueToRValue cast.

llvm-svn: 169522

11 years agoSimplify code.
Jakub Staszak [Thu, 6 Dec 2012 18:22:59 +0000 (18:22 +0000)]
Simplify code.

llvm-svn: 169521

11 years agoClang-format: IndentCaseLabels option, proper namespace handling
Alexander Kornienko [Thu, 6 Dec 2012 18:03:27 +0000 (18:03 +0000)]
Clang-format: IndentCaseLabels option, proper namespace handling

Summary: + tests arranged in groups, as their number is already quite large.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D185

llvm-svn: 169520

11 years agoFixes a typo in this test.
Fariborz Jahanian [Thu, 6 Dec 2012 17:50:40 +0000 (17:50 +0000)]
Fixes a typo in this test.

llvm-svn: 169519

11 years agoClang-format: detect unbalanced braces.
Alexander Kornienko [Thu, 6 Dec 2012 17:49:17 +0000 (17:49 +0000)]
Clang-format: detect unbalanced braces.

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D176

llvm-svn: 169518

11 years agoHexagon TC: Add/improve support for small data
Matthew Curtis [Thu, 6 Dec 2012 17:49:03 +0000 (17:49 +0000)]
Hexagon TC: Add/improve support for small data
 threshold, pic, pie

llvm-svn: 169517

11 years agoFix a bug in the code that merges consecutive stores. Previously we did not
Nadav Rotem [Thu, 6 Dec 2012 17:34:13 +0000 (17:34 +0000)]
Fix a bug in the code that merges consecutive stores. Previously we did not
check if loads that happen in between stores alias with the first store in the
chain, only with the second store onwards.

llvm-svn: 169516

11 years agoMerge rename fix from libcxxabi (r169402: rename class with name that clashes with...
Daniel Malea [Thu, 6 Dec 2012 16:52:09 +0000 (16:52 +0000)]
Merge rename fix from libcxxabi (r169402: rename class with name that clashes with GCC 4.6/4.7)

llvm-svn: 169515

11 years ago[sanitizer] POD-ify the allocator cache
Kostya Serebryany [Thu, 6 Dec 2012 16:22:04 +0000 (16:22 +0000)]
[sanitizer] POD-ify the allocator cache

llvm-svn: 169514

11 years agoFix hexagon-toolchain.c test to handle versioned clang executables.
Matthew Curtis [Thu, 6 Dec 2012 16:01:06 +0000 (16:01 +0000)]
Fix hexagon-toolchain.c test to handle versioned clang executables.

llvm-svn: 169513

11 years agoHexagon TC: Reimplement Link::ConstructJob to call
Matthew Curtis [Thu, 6 Dec 2012 15:46:07 +0000 (15:46 +0000)]
Hexagon TC: Reimplement Link::ConstructJob to call
 linker directly

Rather than calling gcc.

llvm-svn: 169512

11 years agotsan: fix lint warning and make output tests more robust
Dmitry Vyukov [Thu, 6 Dec 2012 15:42:54 +0000 (15:42 +0000)]
tsan: fix lint warning and make output tests more robust

llvm-svn: 169511

11 years agoSema: Don't emit a warning when __func__ is used in a lambda outside of a function.
Benjamin Kramer [Thu, 6 Dec 2012 15:42:21 +0000 (15:42 +0000)]
Sema: Don't emit a warning when __func__ is used in a lambda outside of a function.

Fixes PR14518.

llvm-svn: 169510

11 years agotest/Driver/hexagon-toolchain.c: Unbreak XPASS. Cygwin can be treated as unix-like...
NAKAMURA Takumi [Thu, 6 Dec 2012 14:42:56 +0000 (14:42 +0000)]
test/Driver/hexagon-toolchain.c: Unbreak XPASS. Cygwin can be treated as unix-like system.

llvm-svn: 169509

11 years agoImplements multiple parents in the parent map.
Manuel Klimek [Thu, 6 Dec 2012 14:42:48 +0000 (14:42 +0000)]
Implements multiple parents in the parent map.

Previously we would match the last visited parent, which in the
case of template instantiations was the last instantiated template.

llvm-svn: 169508

11 years ago[asan/msan] one more test for 32-bit allocator + minor code simplification
Kostya Serebryany [Thu, 6 Dec 2012 14:39:41 +0000 (14:39 +0000)]
[asan/msan] one more test for 32-bit allocator + minor code simplification

llvm-svn: 169507

11 years ago[asan/msan] add BulkAllocate to the 32-bit allocator (and a test)
Kostya Serebryany [Thu, 6 Dec 2012 14:27:32 +0000 (14:27 +0000)]
[asan/msan] add BulkAllocate to the 32-bit allocator (and a test)

llvm-svn: 169506