Commit Graph

52367 Commits

Author SHA1 Message Date
Joerg Sonnenberger 1ea6647838 Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.
Don't bother with keeping the old support for x86_64 in 6.99.23+, just
use a single range. Update test cases for the always-on --eh-frame-hdr.

llvm-svn: 208170
2014-05-07 08:45:26 +00:00
Joerg Sonnenberger 3a6c28ad1c Also recognize Big Endian ARM variants.
llvm-svn: 208169
2014-05-07 08:24:23 +00:00
Daniel Jasper 7a2d60e328 clang-format: Fix bad space before braced initializer.
Before:
  new int {1};

After:
  new int{1};

llvm-svn: 208168
2014-05-07 07:59:03 +00:00
Alexey Bataev c6be05db0f [OPENMP] Fixed checking for mangled names in parallel_codegen.cpp test
llvm-svn: 208165
2014-05-07 07:02:29 +00:00
Craig Topper dcfc60ff41 Fix up indentation and fix an 80 column violation.
llvm-svn: 208164
2014-05-07 06:57:44 +00:00
Craig Topper 8ae1203992 [C++11] Use 'nullptr'.
llvm-svn: 208163
2014-05-07 06:21:57 +00:00
Alexey Bataev 15007ba94a [OPENMP] Fixed problem with temp removal on some platforms in codegen for '#pragma omp parallel'
llvm-svn: 208162
2014-05-07 06:18:01 +00:00
David Blaikie 5944d9ce3e PR19562: Fix memory leak when ObjC interface types cause the creation of further interfaces.
llvm-svn: 208161
2014-05-07 06:18:00 +00:00
David Blaikie aa6dd5bbb0 Fixing tests to account for LLVM r208159.
llvm-svn: 208160
2014-05-07 06:09:35 +00:00
Alexey Bataev 79eed41840 [OPENMP] Temporarily disable test parallel_codegen.cpp
llvm-svn: 208156
2014-05-07 04:47:36 +00:00
Jordan Rose 49afeb072f [analyzer] Use a lazily-initialized BugType in ObjCSelfInitChecker.
Follow-up to Nico's leak-stopping patch in r208110.

llvm-svn: 208155
2014-05-07 03:30:04 +00:00
Jordan Rose 2741654b89 [analyzer] Functions marked __attribute__((const)) don't modify any memory.
This applies to __attribute__((pure)) as well, but 'const' is more interesting
because many of our builtins are marked 'const'.

PR19661

llvm-svn: 208154
2014-05-07 03:29:56 +00:00
Richard Smith 3d23c42029 If an instantiation of a template is required to be a complete type, check
whether the definition of the template is visible rather than checking whether
the instantiated definition happens to be in an imported module.

llvm-svn: 208150
2014-05-07 02:25:43 +00:00
Yunzhong Gao e185d28862 Clean up some existing keyword tests in the test/Lexer directory by using the
pre-defined __is_identifier() macro.

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

llvm-svn: 208147
2014-05-07 01:58:02 +00:00
Kaelyn Takata 50c4ffcca7 Try harder to ensure a strict weak ordering of overload candidates that
have arity mismatches.

llvm-svn: 208146
2014-05-07 00:43:38 +00:00
Argyrios Kyrtzidis 37b7b2aefc Rename "secondary initializer" -> "convenience initializer" in the warnings, which is a more correct and consistent term.
llvm-svn: 208142
2014-05-06 23:24:16 +00:00
David Majnemer 3b3bdb5169 AST: Update reference temporary mangling
Summary:
Update our mangling to match the discussion on cxx-abi-dev.

This involves using a seq-id instead of an optional number.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 208140
2014-05-06 22:49:16 +00:00
Nick Lewycky 0c4833f07e Add testcase for r208062.
llvm-svn: 208138
2014-05-06 22:28:58 +00:00
Tobias Grosser cfc57bb6e3 tblgen: Modularize the diagnostic emitter
Replace a large monolitic function, with per-table functions which all nicely
fit on my screen. I also added documentation to each function that describes
what kind of tables are generated and which information is contained and
switched to range based for loops. Finally, I run clang-format over the moved
code.

I spent a significant amount of time to understand this code when reasoning
about possible extensions to the diagnostic interface to support 'remark'
diagnostics. This change will definitely help such an implementation, but
already by itself it will save other people a lot of time when trying to
understand this functionality.

Even though the patch touches the full function, it is mostly mechanical. No
functional change intended. The generated tblgen files are identical.

llvm-svn: 208136
2014-05-06 22:06:56 +00:00
Nico Weber bdc969839a Include translation unit filename in global ctor symbol names.
This makes it easier to see where a global ctor comes from, and it also makes
ASan's init order analyzer output easier to understand.  gcc does this too,
but only in -fPIC mode for some reason.  Don't do this for constructors with
explicit init priority.

Also prepend "sub_" before the 'I', that way regular constructors stay
lexicographically after symbols with init priority (because
ord('s') > ord('I')).  gold seems to ignore the name of constructor symbols,
and ld only looks at the symbol if it includes an init priority, which this
patch doesn't change.

Before: __GLOBAL_I_a
Now: __GLOBAL_sub_I_myfile.cc
llvm-svn: 208128
2014-05-06 20:32:45 +00:00
David Blaikie 483a9da598 Reapply: DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use.
Reverting r208106 to reapply r208065 with a fix for the regression. The
issue was that the enum tried to be built even if the declaration hadn't
been constructed for debug info - presenting problems for enum templates
and typedefs of enums with names for linkage purposes.

Original commit message:

This regressed a little further 208055 though it was already a little
broken.

While the requiresCompleteType optimization should be implemented here.
Future (possibly near future) work.

llvm-svn: 208114
2014-05-06 18:35:21 +00:00
Nico Weber 7ce830bb67 Fix leak in ObjCSelfInitChecker, found by LSan.
BugReport doesn't take ownership of the bug type, so let the checker own the
the bug type.  (Requires making the bug type mutable, which is icky, but which
is also what other checkers do.)

llvm-svn: 208110
2014-05-06 17:33:42 +00:00
Nico Weber 5f8116ba46 Fix a leak found by LSan: ConsumedBlockInfo owns its StateMapsArray entries.
(I tried converting StateMapsArray to a vector<unique_ptr> and changing the
types of getInfo() and addInfo() to take unique_ptrs.  This mostly worked,
except for the three-argument form of addInfo() which I found confusing enough
that I went with this simpler fix for now.)

llvm-svn: 208108
2014-05-06 17:18:03 +00:00
David Blaikie 29020cc571 Revert "DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use."
This is breaking the compiler-rt build. Reverting while I
investigate/fix.

This reverts commit r208065.

llvm-svn: 208106
2014-05-06 17:02:15 +00:00
Tilmann Scheller e914bc8d46 Add driver support for AArch64 Fedora.
Reviewed by Eric Christopher.

llvm-svn: 208105
2014-05-06 16:58:14 +00:00
Jordan Rose b5d2dc2e89 Update comment for ObjCImplementationDecl's handling of instance variables.
No functionality change.

llvm-svn: 208099
2014-05-06 16:07:54 +00:00
Daniel Jasper 484033b188 clang-format: [JS] Keep space after closure style comments.
Before:
  var x = /** @type {foo} */ (bar);

After:
  var x = /** @type {foo} */(bar);

llvm-svn: 208093
2014-05-06 14:41:29 +00:00
Daniel Jasper 166c19bd37 clang-format: [JS] Keep space between 'return' and '['.
llvm-svn: 208090
2014-05-06 14:12:21 +00:00
Daniel Jasper 4a39c84c91 clang-format: [JS] Don't indent in goog.scope blocks.
Before:
  goog.scope(function() {
    var x = a.b;
    var y = c.d;
  });  // goog.scope

After:
  goog.scope(function() {
  var x = a.b;
  var y = c.d;
  });  // goog.scope

llvm-svn: 208088
2014-05-06 13:54:10 +00:00
Alexey Bataev 0b397eaf93 [OPENMP] Another one fix for codegen test '#pragma omp parallel'
llvm-svn: 208087
2014-05-06 13:15:00 +00:00
Alexey Bataev 795b88b040 [OPENMP] Fixed test for '#pragma omp parallel' codegen
llvm-svn: 208086
2014-05-06 13:02:17 +00:00
Dinesh Dwivedi 2e92e66f66 Fixed one issue with casting
Before:
(void) SimplifyICmpOperands(Cond, LHS, RHS);

After:
(void)SimplifyICmpOperands(Cond, LHS, RHS);

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

llvm-svn: 208080
2014-05-06 11:46:49 +00:00
Alexey Bataev e357df8eae [OPENMP] Temporary disable test for parallel codegen
llvm-svn: 208078
2014-05-06 10:51:53 +00:00
Alexey Bataev 9959db5fa9 [OPENMP] Initial codegen for '#pragma omp parallel'
llvm-svn: 208077
2014-05-06 10:08:46 +00:00
Kevin Qin e5cee260ce [PATCH] [ARM64] Enable alignment control option in front-end for ARM64.
This patch is to get "-mno-unaligned-access" and "-munaligned-access"
work in front-end for ARM64 target.

llvm-svn: 208075
2014-05-06 09:51:32 +00:00
Robert Lytton d263f14a0f XCore target: fix initialization bug found by MSan Bot.
llvm-svn: 208072
2014-05-06 09:38:54 +00:00
Dinesh Dwivedi 13b9b7e0e8 Pulled out cast detection in TokenAnnotator into its own function
This is to remove FIXME added in r207964.

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

llvm-svn: 208071
2014-05-06 09:08:34 +00:00
David Blaikie 57407525fd DebugInfo: Emit the definition of enums when the definition preceeds the declaration and initial use.
This regressed a little further 208055 though it was already a little
broken.

While the requiresCompleteType optimization should be implemented here.
Future (possibly near future) work.

llvm-svn: 208065
2014-05-06 07:33:30 +00:00
Craig Topper 34b4c43863 [C++11] Use 'nullptr'
llvm-svn: 208063
2014-05-06 06:48:52 +00:00
Nick Lewycky aa7168a215 Fix crash when one overload candidate is a template instead of a function. Patch by Kaelyn Takata.
Testcase coming out of creduce will land in a separate commit shortly.

Also, it appears that this callback is used even in a SFINAE context where the results are never displayed.

llvm-svn: 208062
2014-05-06 06:35:27 +00:00
Alexey Bataev bcbadb65ab [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP clause 'proc_bind'
llvm-svn: 208060
2014-05-06 06:04:14 +00:00
David Blaikie f427b00b9a PR19598: Ensure temporary metadata nodes used in debug info are destroyed.
CGDebugInfo and DIBuilder were lax in their handling of temporary
MDNodes. All temporary nodes need to be deleted, which means they need
to be RAUW'd with a permanent node. This was not happening.

To ensure this, leverage DIBuilder's new ability to create both
permanent and temporary declarations. Ensure all temporary declarations
are RAUW'd, even with itself. (DIDescriptor::RAUW handles the case where
it is replaced with itself and creates a new, duplicate permanent node
to replace itself with)

This means that all temporary declarations must be added to the
ReplacementMap even if they're never upgraded to definitions - so move
the point of insertion into the map to the point of creation of the
declarations.

llvm-svn: 208055
2014-05-06 03:42:01 +00:00
Nico Weber 9ef9ca470f Support field references to struct names and c++11 aliases from inline asm.
This is in addition to the existing support for typedefs.

llvm-svn: 208053
2014-05-06 03:13:27 +00:00
Nick Lewycky e749400012 I fixed this fixme in r208017.
llvm-svn: 208027
2014-05-06 01:09:50 +00:00
Alp Toker 1fd1d5215c www: add a missing HTML open tag
This went AWOL in r207995.

llvm-svn: 208018
2014-05-06 00:17:24 +00:00
David Blaikie ef8a951882 Build debug info for ObjC interface types at the end of the translation unit to ensure all ivars are included.
This takes a different approach than the
completedType/requiresCompleteType work which relies on AST callbacks to
upgrade the type declaration to a definition. Instead, just defer
constructing the definition to the end of the translation unit.

This works because the definition is never needed by other debug info
(so far as I know), whereas the definition of a struct may be needed by
other debug info before the end of the translation unit (such as
emitting the definition of a member function which must refer to that
member function's declaration).

If we had a callback for whenever an IVar was added to an ObjC interface
we could use that, and remove the need for the ObjCInterfaceCache, which
might be nice. (also would need a callback for when it was more than
just a declaration so we could get properties, etc).

A side benefit is that we also don't need the CompletedTypeCache
anymore. Just rely on the declaration-ness of a type to decide whether
its definition is yet to be emitted.

There's still the PR19562 memory leak, but this should hopefully make
that a bit easier to approach.

llvm-svn: 208015
2014-05-05 23:23:53 +00:00
David Blaikie fc55cb6e14 ObjC IVars aren't added when the type isn't emitted after the interface extension
llvm-svn: 208014
2014-05-05 23:23:50 +00:00
Richard Trieu 2664dc184e During parsing, update the range of the Declarator to include the identifier.
llvm-svn: 208011
2014-05-05 22:06:50 +00:00
Argyrios Kyrtzidis 26d56393c6 [Basic/FileManager] Propagate whether a file 'IsVolatile' to the file opening functions.
Needs llvm r208007.

llvm-svn: 208008
2014-05-05 21:57:46 +00:00
Ben Langmuir 71e1a64f91 Add -Wnon-modular-include* options
Warn on non-modular includes in various contexts.

-Wnon-modular-include
 -Wnon-modular-include-in-module
  -Wnon-modular-include-in-framework-module

Where each group is a subgroup of those above it.

llvm-svn: 208004
2014-05-05 21:44:13 +00:00