Commit Graph

123894 Commits

Author SHA1 Message Date
Richard Smith 2a70e65436 Improve diagnostics for UCNs referring to control characters and members of the
basic source character set in C++98. Add -Wc++98-compat diagnostics for same in
literals in C++11. Extend such support to cover string literals as well as
character literals, and mark N2170 as done.

This seems too minor to warrant a release note to me. Let me know if you disagree.

llvm-svn: 152444
2012-03-09 22:27:51 +00:00
Kevin Enderby deed5aaa41 Add the missing call to Error when a bad X86 scale expression is parsed.
llvm-svn: 152443
2012-03-09 22:24:10 +00:00
Daniel Dunbar 900ceade87 [Sema] Fix a diag change to include a range that appeared intended, but never
actually happened.

llvm-svn: 152442
2012-03-09 21:38:22 +00:00
Nico Weber 97bd94bd98 Update comment after r152140. Clarify a bit too.
llvm-svn: 152441
2012-03-09 21:19:44 +00:00
Anna Zaks 394d07ea88 [analyzer] Add support for NoRedundancy inlining mode.
We do not reanalyze a function, which has already been analyzed as an
inlined callee. As per PRELIMINARY testing, this gives over
50% run time reduction on some benchmarks without decreasing of the
number of bugs found.

Turning the mode on by default.

llvm-svn: 152440
2012-03-09 21:14:01 +00:00
Anna Zaks c255577062 CallGraph: Add getNode() method, constify.
llvm-svn: 152439
2012-03-09 21:13:53 +00:00
Jim Ingham 329617a80a Make debugserver quieter about memory read errors.
<rdar://problem/10681220>

llvm-svn: 152438
2012-03-09 21:09:42 +00:00
Argyrios Kyrtzidis b7d1ca27bd Allow serializing an invalid ParmVarDecl and don't set access to public for
invalid ParmVarDecls.

Part of rdar://11007039.

llvm-svn: 152437
2012-03-09 21:09:04 +00:00
David Meyer 6c614bf717 Support reading GNU symbol versions in ELFObjectFile
* Add enums and structures for GNU version information.
* Implement extraction of that information on a per-symbol basis (ELFObjectFile::getSymbolVersion).
* Implement a generic interface, GetELFSymbolVersion(), for getting the symbol version from the ObjectFile (hides the templating).
* Have llvm-readobj print out the version, when available.
* Add a test for the new feature: readobj-elf-versioning.test

llvm-svn: 152436
2012-03-09 20:59:52 +00:00
David Meyer d53422d1a7 [Object]
Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big

llvm-svn: 152435
2012-03-09 20:41:57 +00:00
Daniel Dunbar 4fccc877c9 Revert r152430 "[AST] Mark ASTContext::getTypeInfo and some friends as
LLVM_READONLY.", getTypeInfo() is totally not READONLY, which I should have
probably noticed given that I made it so mere hours ago. Oops.

llvm-svn: 152434
2012-03-09 20:41:19 +00:00
Matt Beaumont-Gay 639ac334c7 Add a helper to get a CXXConstructExpr from a CXXNewExpr.
llvm-svn: 152433
2012-03-09 20:36:34 +00:00
Argyrios Kyrtzidis 2559629c5b Improve our semantic error recovery.
When an error made a record member invalid, the record would stay as "isBeingDefined" and
not "completeDefinition". Even easily recoverable errors ended up propagating records in
such "beingDefined" state, for example:

struct A {
  ~A() const; // expected-error {{'const' qualifier is not allowed on a destructor}}
};
struct B : A {}; // A & B would stay as "not complete definition" and "being defined".

This weird state was impending lookups in the records and hitting assertion in the ASTWriter.

Part of rdar://11007039

llvm-svn: 152432
2012-03-09 20:10:30 +00:00
Daniel Dunbar d5744b9910 [AST] Mark Expr::Ignore*() functions as LLVM_READONLY.
llvm-svn: 152431
2012-03-09 20:02:56 +00:00
Daniel Dunbar b150e1b1af [AST] Mark ASTContext::getTypeInfo and some friends as LLVM_READONLY.
llvm-svn: 152430
2012-03-09 20:02:54 +00:00
Daniel Dunbar 0fbc2bd499 [AST] Mark Expr::getExprLoc() as LLVM_READONLY.
llvm-svn: 152429
2012-03-09 20:02:51 +00:00
Daniel Dunbar eda65572bb [Sema] Remove dead getSourceRange() call, caught by Clang after marking
LLVM_READONLY.

llvm-svn: 152428
2012-03-09 20:02:47 +00:00
Jim Ingham 34aae5b9bc Handle the case where we get called to determine the ObjC runtime version BEFORE the loader code has
winnowed all the unloaded libraries from the process module list.
<rdar://problem/11015223>

llvm-svn: 152427
2012-03-09 19:59:28 +00:00
Daniel Dunbar e4775e1659 [AST/etc] Mark {getSourceRange(),getStartLoc(),getEndLoc()} as LLVM_READONLY.
- The theory here is that we have these functions sprinkled in all over the
   place. This should allow the optimizer to at least realize it can still do
   load CSE across these calls.
 - I blindly marked all instances as such, even though the optimizer can infer
   this attribute in some instances (some of the inline ones) as that was easier
   and also, when given the choice between thinking and not thinking, I prefer
   the latter.

You might think this is mere frivolity, but actually this is good for a .7 -
1.1% speedup on 403.gcc/combine.c, JSC/Interpreter.cpp,
OGF/NSBezierPath-OAExtensions.m.

llvm-svn: 152426
2012-03-09 19:35:29 +00:00
Duncan Sands 14eb175836 Add statistics on removed switch cases, and fix the phi statistic
to count the number of phis changed, not the number visited.

llvm-svn: 152425
2012-03-09 19:21:15 +00:00
Richard Smith f5a0d10c2c Add user-defined literals to release notes.
llvm-svn: 152424
2012-03-09 19:09:47 +00:00
Enrico Granata 332b0b9a2f Fixing a problem with the NSSet summary provider; plus, providing a further optimization to the whole Cocoa formatters infrastructure
llvm-svn: 152423
2012-03-09 19:04:53 +00:00
Gregory Szorc 3a08300585 [llvm.py] Make ObjectFile destructor work
Previous code had a double free in MemoryBuffer. The tests now pass.

llvm-svn: 152422
2012-03-09 18:56:33 +00:00
Dan Gohman 500b598c5c When identifying exit nodes for the reverse-CFG reverse-post-order
traversal, consider nodes for which the only successors are backedges
which the traversal is ignoring to be exit nodes. This fixes a problem
where the bottom-up traversal was failing to visit split blocks along
split loop backedges. This fixes rdar://10989035.

llvm-svn: 152421
2012-03-09 18:50:52 +00:00
Fariborz Jahanian c8a322a407 lldb support: under debugger support flag, when sending message
to forward class, and assigning to an 'id' type var, message
sends default to 'id'. // rdar"//10988847

llvm-svn: 152420
2012-03-09 18:47:16 +00:00
Daniel Dunbar 62ee6417ac [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().
- getSourceRange().getBegin() is about as awesome a pattern as .copy().size().

I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.

llvm-svn: 152419
2012-03-09 18:35:03 +00:00
Daniel Dunbar ddb83c7194 [AST/Sema] Add {CXXBaseSpecifier,Declarator,DeclSpec,TypeLoc,UnqualifiedId}::getLoc{Start,End}.
llvm-svn: 152418
2012-03-09 18:34:54 +00:00
Howard Hinnant 3bfc622bdb Enable / silence -Wunused-parameter.
llvm-svn: 152415
2012-03-09 18:01:37 +00:00
Kevin Enderby 014e1cde5f Fix the x86 disassembler to at least print the lock prefix if it is the first
prefix.  Added a FIXME to remind us this still does not work when it is not the
first prefix.

llvm-svn: 152414
2012-03-09 17:52:49 +00:00
Daniel Dunbar 3618cb7b6b [Support] Drop verbose _ATTRIBUTE from LLVM_ATTRIBUTE_{READONLY,READNONE} macro
names.

llvm-svn: 152413
2012-03-09 16:30:33 +00:00
Daniel Dunbar cdf295c532 [AST] Define a few more key getLocStart() implementations.
- This cuts the # of getSourceRange calls by 60% on
   OGF/NSBezierPath-OAExtensions.m.

llvm-svn: 152412
2012-03-09 15:39:24 +00:00
Daniel Dunbar b0ab5e9f5c [AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.
- getSourceRange() can be very expensive, we should try to avoid it if at all possible.

In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m.

llvm-svn: 152411
2012-03-09 15:39:19 +00:00
Daniel Dunbar b507f27185 [AST] Add {DeclRefExpr,MemberExpr,ImplicitCastExpr}::{getLocStart,getLocEnd} methods.
- There are probably a lot more of these worth adding, but these are a start at hitting some of the exprs for which getSourceRange().getBegin() is a poor substitute for getLocStart().

llvm-svn: 152410
2012-03-09 15:39:15 +00:00
Daniel Dunbar d863d31f4b [AST] Add DeclaratioName::getLoc{Start,End} for consistency.
llvm-svn: 152409
2012-03-09 15:39:11 +00:00
Daniel Dunbar 7b93f636e0 [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bit
more obvious.

llvm-svn: 152408
2012-03-09 15:39:08 +00:00
NAKAMURA Takumi c72fdf4490 TableGen/CodeEmitterGen.cpp: Fix an expression of generating bitmask.
~0U might be i32 on 32-bit hosts, then (uint64_t)~0U might not be expected as (i64)0xFFFFFFFF_FFFFFFFF, but as (i64)0x00000000_FFFFFFFF.

llvm-svn: 152407
2012-03-09 14:52:44 +00:00
NAKAMURA Takumi aebd3da46d test/MC/X86/lit.local.cfg: Fix up to detect 'X86' in targets.
llvm-svn: 152406
2012-03-09 14:52:38 +00:00
Duncan Sands cca89124a2 Eliminate switch cases that can never match, for example removes all
negative switch cases if the branch condition is known to be positive.
Inspired by a recent improvement to GCC's VRP.

llvm-svn: 152405
2012-03-09 13:45:18 +00:00
Benjamin Kramer 1f5568c55f Harden test for 32 bit platforms, where size_t is unsigned int (not unsigned long).
llvm-svn: 152404
2012-03-09 13:17:27 +00:00
Hans Wennborg aa8c61cf94 -Wformat-non-iso: warn about positional arguments (pr12017)
This renames the -Wformat-non-standard flag to -Wformat-non-iso,
rewords the current warnings a bit (pointing out that a format string
is not supported by ISO C rather than being "non standard"),
and adds a warning about positional arguments.

llvm-svn: 152403
2012-03-09 10:10:54 +00:00
Richard Smith 29e9595bd7 Fix statement printing for raw and template user-defined literals.
llvm-svn: 152401
2012-03-09 10:10:02 +00:00
Anton Korobeynikov f32638d77c Add support for r600 (AMD GPUs HD2XXX - HD6XXX) target triplet.
Patch by Tom Stellard!

llvm-svn: 152400
2012-03-09 10:09:36 +00:00
Nick Lewycky fea3e00e09 Factor out the analysis of addition and subtraction in ComputeMaskedBits. Reuse
it to analyze extractvalue(llvm.[us](add|sub).with.overflow.*) intrinsics!

llvm-svn: 152398
2012-03-09 09:23:50 +00:00
Gregory Szorc c04bbd27af [llvm.py] Initial skeleton for Python LLVM bindings
This contains a semi-functional skeleton for the implementation of the
LLVM bindings for Python.

The API for the Object.h interface is roughly designed but not
implemented. MemoryBufferRef is implemented and actually appears to
work!

The ObjectFile unit test fails with a segmentation fault because the
LLVM library isn't being properly initialized. The build system doesn't
know about this code yet, so no alerts should fire.

llvm-svn: 152397
2012-03-09 09:07:35 +00:00
Richard Smith 5023188315 User-defined literals are done.
llvm-svn: 152396
2012-03-09 08:41:27 +00:00
Richard Smith c1b0565a26 Literal operator suffixes and regular names live in separate namespaces.
llvm-svn: 152395
2012-03-09 08:37:16 +00:00
Richard Smith 768ceccc75 Literal operators can't have default arguments.
llvm-svn: 152394
2012-03-09 08:16:22 +00:00
Andrew Trick edfe2ec429 misched: handle scheduling region boundaries nicely.
llvm-svn: 152393
2012-03-09 08:02:51 +00:00
Richard Smith bcc22fc4e1 Support for raw and template forms of numeric user-defined literals,
and lots of tidying up.

llvm-svn: 152392
2012-03-09 08:00:36 +00:00
Craig Topper 2dac962864 Use uint16_t to store opcodes in static tables in X86 backend.
llvm-svn: 152391
2012-03-09 07:45:21 +00:00