Commit Graph

156913 Commits

Author SHA1 Message Date
Manman Ren 035c4b029f Debug Info: generate a unique identifier for C++ struct, class, union, and enum.
We use CXX mangler to generate unique identifier for external C++ struct,
union, class and enum. Types with unique identifier are added to RetainedTypes
to make sure they are treated as used even when all uses are replaced with
the identifiers.

A single type can be added to RetainedTypes multiple times. For example, both 
createForwardDecl and createLimitedType can add the same type to RetainedTypes.
A set is used to avoid duplication when updating AllRetainTypes in DIBuilder.

Testing cases are updated to reflect the unique identifier generated for types.
The order of MDNodes is changed because of retained types and testing cases
are updated accordingly.

Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since
uuid is not yet handled in Itanium mangler.

We choose to update RetainedTypes in clang, then at finalize(), we update
AllRetainTypes in DIBuilder. The other choice is to update AllRetainTypes
in DIBuilder when creating a DICompositeType with unique identifier. This
option requires using ValueHandle for AllRetainTypes in DIBuilder since
the created DICompositeType can be modified later on by setContainingType etc.

llvm-svn: 189600
2013-08-29 18:51:51 +00:00
Kaelyn Uhrain 13cf3beeb3 Fix the following error when NDEBUG is defined:
include/llvm/Support/UnicodeCharRanges.h:56:5: error:
use of this statement in a constexpr constructor is a C++1y extension
[-Werror,-Wc++1y-extensions]
     assert(rangesAreValid());
          ^

llvm-svn: 189599
2013-08-29 18:49:35 +00:00
Ed Maste 47e575e267 Disable stub Host::FindProcesses on FreeBSD
A FreeBSD implementation was added in r189295.

llvm-svn: 189598
2013-08-29 18:44:27 +00:00
Andrew Trick 483f4199f3 Comment and revise the cyclic critical path code.
This should be much more clear now. It's still disabled pending testing.

llvm-svn: 189597
2013-08-29 18:04:49 +00:00
Eric Christopher f8a1baab9d Fix warning about anonymous structs in anonymous unions.
llvm-svn: 189596
2013-08-29 18:00:58 +00:00
Alexander Kornienko d7b837e78d Better support for multiline string literals (including C++11 raw string literals).
Summary:
Calculate characters in the first and the last line correctly so that
we only break before the literal when needed.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 189595
2013-08-29 17:32:57 +00:00
DeLesley Hutchins 5533ec5c55 Consumed analysis: improve handling of conditionals.
Patch by chris.wailes@gmail.com.

* The TestedVarsVisitor was folded into the ConsumedStmtVisitor.
* The VarTestResult class was updated to allow these changes.
* The PropagationInfo class was updated for the same reasons.
* Correctly handle short-circuiting of Boolean operations.
* Blocks are now marked as unreachable when we can statically prove we will
  never branch to them.
* Unreachable blocks are skipped by the analysis.

llvm-svn: 189594
2013-08-29 17:26:57 +00:00
Manman Ren f5d4535a93 Add unique identifier field to Composite Types and Format.
llvm-svn: 189593
2013-08-29 17:07:49 +00:00
Fariborz Jahanian 4ccdc73f44 ObjectiveC migrator: remove dead code.
llvm-svn: 189592
2013-08-29 16:22:26 +00:00
NAKAMURA Takumi 5cbfb3b423 clang/test/Frontend/rewrite-includes.c: Tweak expressions for r'\\', not r'\', on win32.
llvm-svn: 189591
2013-08-29 16:11:17 +00:00
Pavel Labath 2c65dfaab5 [analyzer] Fix handling of "empty" structs with base classes
Summary:
RegionStoreManager had an optimization which replaces references to empty
structs with UnknownVal. Unfortunately, this check didn't take into account
possible field members in base classes.

To address this, I changed this test to "is empty and has no base classes". I
don't consider it worth the trouble to go through base classes and check if all
of them are empty.

Reviewers: jordan_rose

CC: cfe-commits

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

llvm-svn: 189590
2013-08-29 16:06:04 +00:00
Daniel Malea 70e7e19e57 fix FreeBSD build error
- s/LogSP/Log */ in ProcessMonitorFreeBSD.cpp

llvm-svn: 189589
2013-08-29 15:54:34 +00:00
Alexey Samsonov 5ffab0959a Minor updates to gen_dynamic_list script suggested by glider
llvm-svn: 189588
2013-08-29 15:45:41 +00:00
Samuel Benzaquen 68cd396f82 Fix tests to be more specific.
The environments can inject some declaration in every translation unit,
which can match very generic matchers, thus failing the tests.

Summary:
Fix tests to be more specific.
The environments can inject some declaration in every translation unit,
which can match very generic matchers, thus failing the tests.

Reviewers: aaron.ballman

CC: klimek, cfe-commits, revane

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

llvm-svn: 189587
2013-08-29 15:39:26 +00:00
Marshall Clow 24cca08054 Mark issues 2147, 2149, 2163, 2172, 2098 and 2177 as complete. No code changes to libc++
llvm-svn: 189586
2013-08-29 15:35:54 +00:00
Manuel Klimek 31c85921b2 Fixes various problems with accounting for tabs in the original code.
We now count the original token's column directly when lexing the
tokens, where we already have all knowledge about where lines start.

Before this patch, formatting:
 void f() {
 \tg();
 \th();
 }
would incorrectly count the \t's as 1 character if only the line
containing h() was reformatted, and thus indent h() at offset 1.

llvm-svn: 189585
2013-08-29 15:21:40 +00:00
Guillaume Papin 81332632b1 cpp11-migrate: Add Pass-By-Value Transform
Currently only constructor parameters stored in class-local storage are modified
to make use of the pass-by-value idiom but this is a base that can be be further
improved to handle more situations.

This commit is the same as r189363 with additionnal fixes for the build issues.

llvm-svn: 189584
2013-08-29 13:42:13 +00:00
Alexander Kornienko 37d6b18633 Use new UnicodeCharSet interface.
Summary: This is a Clang part of http://llvm-reviews.chandlerc.com/D1534

Reviewers: jordan_rose, klimek, rsmith

Reviewed By: rsmith

CC: cfe-commits

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

llvm-svn: 189583
2013-08-29 12:12:31 +00:00
Alexander Kornienko a330ef49aa isCharInSet refactoring.
Summary:
Made UnicodeCharSet a class, perform validity checking inside its
constructor instead of each isCharInSet call, use std::binary_search instead of
own implementation.
This patch comes with a necessary change in clang (sent separately).

Reviewers: jordan_rose, klimek

Reviewed By: klimek

CC: cfe-commits, rsmith

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

llvm-svn: 189582
2013-08-29 12:12:13 +00:00
Alexey Samsonov 06379b3537 [TSan] Add a couple of compiler warnings to TSan runtime compile flags
llvm-svn: 189581
2013-08-29 12:08:36 +00:00
Elena Demikhovsky 980c6b08b1 AVX-512: added extend and truncate instructions.
llvm-svn: 189580
2013-08-29 11:56:53 +00:00
Alexey Samsonov ab7ff52efd [TSan] Move build rules a bit to ensure correct dependencies of check-tsan command
llvm-svn: 189579
2013-08-29 11:53:11 +00:00
Alexey Samsonov 25dc018843 [sanitizer] Parallelize lint checker script
llvm-svn: 189578
2013-08-29 11:35:01 +00:00
Alexey Samsonov 5a2f073926 [sanitizer] Refine CMake rules for generating exported symbols and lint checking
llvm-svn: 189577
2013-08-29 10:49:04 +00:00
Hafiz Abid Qadeer 9a78cdf825 Discover support of 'p' packet.
Some stubs only support g/G packets for registers.
This change makes sure that we check if remote stub supports 'p' packet before using it.

llvm-svn: 189576
2013-08-29 09:09:45 +00:00
Serge Pavlov 0ccd3f61b1 Removed useless default branch of switch statement.
The problem was caught by sanitizer build.

llvm-svn: 189575
2013-08-29 08:20:07 +00:00
Kevin Qin c076d0682b mangle aarch64 Neon ACLE scalar instrinsic name with BHSD suffix.
llvm-svn: 189574
2013-08-29 07:55:15 +00:00
Rui Ueyama d4b9d068f0 [PECOFF] Fix bug that section grouping may lay out atoms in a wrong order.
We added layout edges to the head atoms in grouped sections. That was wrong,
because the head atom needs to be followed by the other atoms in the *same*
section, not by the other section contents. With this patch, layout edges are
added from tail atom, which is the last atom in a section, to head atom.

llvm-svn: 189573
2013-08-29 07:46:23 +00:00
Rui Ueyama 79e8215f96 [PECOFF] Fix bug that atom size was sometimes wrong.
Because of a bug, the last atom of each section contained a garbage at the
end of its data. In most cases the garbage is harmless but it could have cause
SEGV.

llvm-svn: 189572
2013-08-29 07:34:58 +00:00
Serge Pavlov 9929209dfb Change return type of Sema::DiagnoseAmbiguousLookup from bool to void.
The function always returned true value, which was never used.

llvm-svn: 189571
2013-08-29 07:23:24 +00:00
Rui Ueyama 5a383d10ac [PECOFF] Add helper functions for debugging
llvm-svn: 189570
2013-08-29 07:17:47 +00:00
Craig Topper b78e9d9b2f Make getDiagnosticsInGroup helper method a static function in the cpp file and move the WarningOption struct into an anonymous namespace instead of clang namespace since it no longer needs to be forward declared in the header.
llvm-svn: 189569
2013-08-29 06:06:18 +00:00
Craig Topper da7cf8ab2b Move individual group name strings from the OptionTable into one big char array. Then only store offsets into it in the OptionTable. Saves about 4K from the clang binary and removes 400 relocation entries from DiagnosticIDs.o.
llvm-svn: 189568
2013-08-29 05:18:04 +00:00
Craig Topper 3e1d5da901 Move StringToOffsetTable into the TableGen include directory so I can use it in clang.
llvm-svn: 189567
2013-08-29 05:09:55 +00:00
Hal Finkel 8e83820a04 Revert: r189565 - Add getUnrollingPreferences to TTI
Revert unintentional commit (of an unreviewed change).

Original commit message:

Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

llvm-svn: 189566
2013-08-29 03:33:15 +00:00
Hal Finkel 63e6c0e9fb Add getUnrollingPreferences to TTI
Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

llvm-svn: 189565
2013-08-29 03:29:57 +00:00
Hal Finkel 5ef4dccdce Use TargetSubtargetInfo::useAA() in DAGCombine
This uses the TargetSubtargetInfo::useAA() function to control the defaults of
the -combiner-alias-analysis and -combiner-global-alias-analysis options.

llvm-svn: 189564
2013-08-29 03:29:55 +00:00
Hal Finkel b350ffd1b1 Add useAA() to TargetSubtargetInfo
There are several optional (off-by-default) features in CodeGen that can make
use of alias analysis. These features are important for generating code for
some kinds of cores (for example the (in-order) PPC A2 core). This adds a
useAA() function to TargetSubtargetInfo to allow these features to be enabled
by default on a per-subtarget basis.

Here is the first use of this function: To control the default of the
-enable-aa-sched-mi feature.

llvm-svn: 189563
2013-08-29 03:25:05 +00:00
Daniel Dunbar 14e88a1577 [tests] Use 'printf' instead of 'echo -e', which is not part of BSD echo.
llvm-svn: 189562
2013-08-29 03:02:39 +00:00
Daniel Dunbar 9d8271b351 [lit] [tests] Add missing test input file.
llvm-svn: 189561
2013-08-29 03:02:34 +00:00
Daniel Dunbar 5c8f5c1c26 [tests] Use multiple statements instead of 'echo -e', which is not part of BSD echo.
llvm-svn: 189560
2013-08-29 03:02:30 +00:00
Daniel Dunbar b8da61fd1b [lit] Fix internal shell's argv[0] handling.
- At least on OS X, it is important for correct behavior of /bin/[ that argv[0]
   is passed as written, and not as the full executable path.

llvm-svn: 189559
2013-08-29 02:52:10 +00:00
Peter Collingbourne 6c77e72659 Two more definitions required by libsupc++ (_sleb128_t and _uleb128_t)
Differential Revision: http://llvm-reviews.chandlerc.com/D1542

llvm-svn: 189558
2013-08-29 01:56:22 +00:00
Eli Friedman 80e45b8cd4 Properly escape filenames in line directives.
Fixes PR17018.  Only partial test coverage because I don't want
to try to write a test which generates a file whose name contains a newline.

llvm-svn: 189557
2013-08-29 01:42:42 +00:00
Daniel Dunbar 9a83a76b1b [lit] Add support for multiprocessing, under --use-processes for now.
llvm-svn: 189556
2013-08-29 00:54:23 +00:00
Daniel Dunbar b3954fa889 [lit] Implement --max-time support by using provider cancel method.
llvm-svn: 189555
2013-08-29 00:54:19 +00:00
Daniel Dunbar 57ab2df070 [lit] Refactor test execution logic into lit.run.Run.
llvm-svn: 189554
2013-08-29 00:54:15 +00:00
Daniel Dunbar eecb1c1d25 [lit] Put display lock inside the ThreadResultsConsumer.
llvm-svn: 189553
2013-08-29 00:54:09 +00:00
Daniel Dunbar 516dc8b9be [lit] Factor out a results consumer interface for test execution.
- Also, change TestProvider interface to operate on test indices.

llvm-svn: 189552
2013-08-29 00:54:02 +00:00
Daniel Dunbar 562b83a64c [lit] Move top-level execute code into Run object.
llvm-svn: 189551
2013-08-29 00:48:55 +00:00