Commit Graph

167172 Commits

Author SHA1 Message Date
Craig Topper 31afdb8c26 Remove some unnecessary code. The conditions it was checking had already been ruled out by the caller.
llvm-svn: 201039
2014-02-09 07:13:41 +00:00
David Blaikie 6cab596218 Improve diagnostic for using non-class/namespace/scoped enum in a nested name specifier.
Rather than simply saying "X is not a class or namespace", clarify what
X is by providing the aka type in the case where X is a type, or
pointing to the named declaration if there's an unambiguous one to refer
to. In the ambiguous case, the ambiguities are already enumerated
(though could be clarified by describing what kind of entities they are)

Included a few FIXMEs in tests where some further improvements could be
made.

llvm-svn: 201038
2014-02-09 06:54:23 +00:00
David Majnemer 158ba130ee Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__
TargetInfo::getSuitableAlign() was introduced in r146762 and is defined
as alignof(std::max_align_t).

Introduce __ALIGNOF_MAX_ALIGN_T__ which exposes getSuitableAlign() so
that libc++ may take advantage of it.

llvm-svn: 201037
2014-02-09 05:30:48 +00:00
Saleem Abdulrasool d1fc17b931 tools: cast the right operand
Properly apply the fix intended by SVN r201032.

llvm-svn: 201036
2014-02-09 03:13:07 +00:00
Sean Silva b829418bc3 [docs] [tblgen] clarify that code fragments are just string literals
Fun fact: looking at the TableGen code (around TGParser.cpp:1166), the
only difference in handling is that adjacent regular string literals are
concatenated in the parser.

llvm-svn: 201035
2014-02-09 02:54:26 +00:00
Sean Silva 2485c214ec [docs] [tblgen] There is no "code" type.
Code fragments are just fancy string literals.

llvm-svn: 201034
2014-02-09 02:54:15 +00:00
Sean Silva cc373354b8 [docs] TableGen easter egg: Multiline string literals
They're called code fragments, but they are really multiline string
literals. Just spotted this usage in a patch by Aaron using "code
fragments" for holding documentation text. I remember someone bemoaning
the lack of multiline string literals in TableGen, so I'm explicitly
documenting that code fragments are multiline string literals.

Let it be known that any use case needing multiline string literals in
TableGen (such as descriptions of options, or whatnot) can use use
code fragments (instead of C-style string concatenation or exceedingly
long lines). E.g.

    class Bar<int n>;
    class Baz<int n>;
    class Doc<string desc> {
        string Desc = desc;
    }
    def Foo : Bar<1>, Baz<3>, Doc<[{
    This Foo is a Bar, and also a Baz. It can take 3 values:
        * Qux
        * Quux
        * Quuux
    }]>;

llvm-svn: 201033
2014-02-09 02:43:50 +00:00
Saleem Abdulrasool 97497b0f1c tools: explicitly cast to avoid a warning
llvm-svn: 201032
2014-02-09 01:12:21 +00:00
Richard Smith 6056d5e918 PR16519, PR18009: When checking a partial specialization for uses of its own
template parameters, don't look for parameters of outer templates. If a problem
is found in a default template argument, point the diagnostic at the partial
specialization (with a note pointing at the default argument) instead of
pointing it at the default argument and leaving it unclear which partial
specialization os problematic.

llvm-svn: 201031
2014-02-09 00:54:43 +00:00
Saleem Abdulrasool a7053cb9cc tools: handle out-of-line personality 0 decoding
In some cases it is possible to have a personality 0 unwinding opcodes in the
extab (such as when .handlerdata is used in the assembly).  Simply decode the 3
opcodes for that case.

llvm-svn: 201030
2014-02-08 23:17:08 +00:00
Saleem Abdulrasool 40726a1c11 ARM: change attribute tests to use parsed form
This makes the tests more readable by using the -arm-attributes decoding support
in llvm-readobj since that is now available.  Change the invocation commands to
be similar to other test and use a more precise triple (the tests only require
ARM EABI support).

llvm-svn: 201029
2014-02-08 23:17:02 +00:00
Arnold Schwaighofer 348e1b60be LoopVectorizer: Keep track of conditional store basic blocks
Before conditional store vectorization/unrolling we had only one
vectorized/unrolled basic block. After adding support for conditional store
vectorization this will not only be one block but multiple basic blocks. The
last block would have the back-edge. I updated the code to use a vector of basic
blocks instead of a single basic block and fixed the users to use the last entry
in this vector. But, I forgot to add the basic blocks to this vector!

Fixes PR18724.

llvm-svn: 201028
2014-02-08 20:41:13 +00:00
Jean-Daniel Dupas 3c6774a172 hostname is guarantee to never be null in this branch.
llvm-svn: 201027
2014-02-08 20:29:40 +00:00
Jean-Daniel Dupas ef37711f85 Fix null dereference if address is NULL.
llvm-svn: 201026
2014-02-08 20:22:05 +00:00
Rafael Espindola fa0f72837f Pass the Mangler by reference.
It is never null and it is not used in casts, so there is no reason to use a
pointer. This matches how we pass TM.

llvm-svn: 201025
2014-02-08 14:53:28 +00:00
Sylvestre Ledru bfc57f8370 Only set EL_PROMPT_ESC when existing - fix typo
llvm-svn: 201024
2014-02-08 13:26:24 +00:00
Sylvestre Ledru 54e7a77690 Only set EL_PROMPT_ESC when existing
llvm-svn: 201023
2014-02-08 13:25:47 +00:00
Rafael Espindola 1070501586 Add LLVM_OVERRIDE to a few declarations.
llvm-svn: 201022
2014-02-08 06:07:27 +00:00
Marshall Clow 74cf6ff5e5 Fix for PR18735 - self-assignment for map/multimap gives incorrect results in C++03
llvm-svn: 201021
2014-02-08 04:03:14 +00:00
John McCall 57420b320c type_info objects are not unnamed_addr: the ABI requires us to
unique them and permits the implementation of dynamic_cast (and
anything else which knows it's working with a complete class
type) to compare their addresses directly.

rdar://16005328

llvm-svn: 201020
2014-02-08 03:26:05 +00:00
Reid Kleckner 42063b0b1c Move the -fms-compatibility using decl check after real access checking
Summary:
This avoids false positives from -Wmicrosoft when name lookup would
normally succeed in standard C++.  This triggered on a common CRTP
pattern in clang, where a derived class would have a private using decl
to pull in members of a dependent base:

class Verifier : InstVisitor<Verifier> {
private:
  using InstVisitor<Verifier>::visit;
  ...
  void anything() {
    visit(); // warned here
  }
};

Real access checks pass here because we're in the context of the
Verifier, but the -Wmicrosoft extension was just looking for the private
access specifier.

Reviewers: rsmith

CC: cfe-commits

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

llvm-svn: 201019
2014-02-08 02:40:20 +00:00
Richard Smith 04d6d2f2af PR18581: Attempt to complete the type in a VLA declaration before checking
whether it's POD.

llvm-svn: 201018
2014-02-08 02:30:49 +00:00
Reid Kleckner 18066822a8 clang-cl: Alias /Zi and /Z7 to -gline-tables-only
LLVM only knows how to emit Z7-style line tables on -win32, so there's
no reason for clang to emit anything other than line info.

llvm-svn: 201017
2014-02-08 01:43:16 +00:00
Nick Lewycky af2064f7ab Add throw() specifiers to more redeclarations of operator delete and operator delete[].
llvm-svn: 201016
2014-02-08 01:42:08 +00:00
Nick Lewycky c0930b808b Stick to C++98 for this.
llvm-svn: 201015
2014-02-08 01:36:21 +00:00
Nick Lewycky fff46e01fd Update these declarations of operator delete (and delete[]) to have noexcept,
as required per core issue 1552 and warned about with
-Wimplicit-exception-spec-mismatch.

llvm-svn: 201014
2014-02-08 01:29:07 +00:00
Reid Kleckner e253b098d3 MS ABI: Use the most recent decl to check the inheritance model
This was crashing compilation of DeclContext::buildLookupImpl<>.

llvm-svn: 201013
2014-02-08 01:15:37 +00:00
Richard Smith f8b417c5ef Fix lifetime issue causing buildbot failures.
llvm-svn: 201012
2014-02-08 00:42:45 +00:00
John McCall 8f80a61914 Remove the -fhidden-weak-vtables -cc1 option. It was dead,
gross, and increasingly replaced through other mechanisms.

llvm-svn: 201011
2014-02-08 00:41:16 +00:00
Dmitri Gribenko c444b57790 ASTUnit: remove dead code in remapping files
ASTUnit contains code to remap files to other files on disk.  This code is not
used.  We only remap files to MemoryBuffers.

llvm-svn: 201010
2014-02-08 00:38:15 +00:00
Juergen Ributzka 9479b31f97 [Constant Hoisting] Fix insertion point for constant materialization.
The bitcast instruction during constant materialization was not placed correcly
in the presence of phi nodes. This commit fixes the insertion point to be in the
idom instead.

This fixes PR18768

llvm-svn: 201009
2014-02-08 00:20:49 +00:00
Juergen Ributzka 4c8a02521d [Constant Hoisting] Don't update the use list while traversing it - DOH!
This fix first traverses the whole use list of the constant expression and
keeps track of the instructions that need to be updated. Then perform the
fixup afterwards.

llvm-svn: 201008
2014-02-08 00:20:45 +00:00
Jordan Rose 4393aa7efb [analyzer] Objective-C object literals are always non-nil.
<rdar://problem/15999214>

llvm-svn: 201007
2014-02-08 00:04:14 +00:00
Rafael Espindola b3b52a7532 Remove dead code.
llvm-svn: 201006
2014-02-07 23:32:41 +00:00
Sean Callanan c5c3a3c92c Added a test case for variables in registers, with
clang -O1.

<rdar://problem/15767528>

llvm-svn: 201005
2014-02-07 23:04:57 +00:00
Nikola Smiljanic 958dbe1e34 Improve existing visualizers by:
- Properly displaying non null terminated StringRef.
- Auto expanding pointer types.
- Displaying real type names for PointerUnions.
- Using "size" and "capacity" across all containers.
- Simplifying code where possible.

llvm-svn: 201004
2014-02-07 22:57:20 +00:00
Greg Clayton 751caf65c2 Modified ObjectFile::SetLoadAddress() to now be:
ObjectFile::SetLoadAddress (Target &target,
                            lldb::addr_t value,
                            bool value_is_offset);

Now "value" is a slide if "value_is_offset" is true, and "value" is an image base address otherwise. All previous usage of this API was using slides.

Updated the ObjectFileELF and ObjectFileMachO SetLoadAddress methods to do the right thing.

Also updated the ObjectFileMachO::SetLoadAddress() function to not load __LINKEDIT when it isn't needed and to only load sections that belong to the executable object file.

llvm-svn: 201003
2014-02-07 22:54:47 +00:00
Richard Smith c7fb225cdc PR16638, DR1552: the exception specification on an implicitly-declared
'operator delete' or 'operator delete[]' is an explicit exception
specification. Therefore we should diagnose 'void operator delete(void*)'
instead of 'void operator delete(void*) noexcept'.

This diagnostic remains an ExtWarn, since in practice people don't always
include the exception specification in such a declaration.

llvm-svn: 201002
2014-02-07 22:51:16 +00:00
Rafael Espindola 3d8a106f6f Comment cleanup. Don't repeat the function name in the comment.
llvm-svn: 201001
2014-02-07 22:45:13 +00:00
Richard Smith c015bc2595 Fold together two repeated identical 'if's.
llvm-svn: 201000
2014-02-07 22:39:53 +00:00
Rafael Espindola 8193d17f4d Comment cleanup. Don't repeat the function name in the comment.
llvm-svn: 200999
2014-02-07 22:39:17 +00:00
Rafael Espindola 4fb4b47f30 Remove training whitespace.
llvm-svn: 200998
2014-02-07 22:33:56 +00:00
Greg Clayton 9b5442aed9 Now that the command interpreter runs in a separate thread in Xcode, we need to lock the target API lock instead of trying to lock it.
What was happening was:
1 - Xcode ran and stopped and was doing work on thread 2
2 - Users would type something in Xcode console on thread 1
3 - thread 3 would be running command interpreter thread and try to execute command but get "failed to get API lock" error for any command that wanted the target API lock (like "expression")

<rdar://problem/15775016>

llvm-svn: 200997
2014-02-07 22:31:20 +00:00
Enrico Granata 41c440fbfe <rdar://problem/12857181>
When a user says

type formatter add ... unsigned int

he most probably means to deal with the "unsigned int" type. However, given how the LLDB command parser works, that command will try to add the formatter to the TWO types 'unsigned' AND 'int'

Since this is unlikely to be what the user wants, warn about it, and suggest they can use quotes to override the debugger's understanding

llvm-svn: 200996
2014-02-07 22:12:55 +00:00
Enrico Granata c1690d0c2b Add conditional breakpoints to our cheat sheet
llvm-svn: 200995
2014-02-07 21:30:02 +00:00
Rafael Espindola 5054362920 Always create a temporary symbol to use with the cfi frame.
This is a small simplification and a small step in fixing pr18743 since
private functions on MachO should be using a 'l' prefix.

llvm-svn: 200994
2014-02-07 21:23:18 +00:00
Joerg Sonnenberger a0a143690d Avoid signed vs unsigned compare warnings. From Dimitry Andric.
llvm-svn: 200993
2014-02-07 21:14:29 +00:00
Rafael Espindola e393aab13b Use FileCheck variables to simplify this test.
llvm-svn: 200992
2014-02-07 21:11:33 +00:00
Sean Callanan 3d6ae767a0 When writing data back into a register, accept
values whose size differs from the register's
size.

llvm-svn: 200991
2014-02-07 20:42:44 +00:00
Renato Golin 3dc5ade8bb Fix Darwin bots from EHABI change
llvm-svn: 200990
2014-02-07 20:32:32 +00:00