Commit Graph

75860 Commits

Author SHA1 Message Date
Victor Hernandez 61e6e829c6 Fix printing of function-local metadata in AsmWriter
llvm-svn: 93402
2010-01-14 01:47:37 +00:00
Victor Hernandez b816154268 Clean up unnecessary return and brackets
llvm-svn: 93401
2010-01-14 01:46:02 +00:00
Victor Hernandez 8c85e25589 Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
llvm-svn: 93400
2010-01-14 01:45:14 +00:00
Anders Carlsson 2a4adbea96 Add a DenseMapInfo specialization for BaseSubobject.
llvm-svn: 93399
2010-01-14 01:39:42 +00:00
Douglas Gregor 69a8e083c5 When providing completions for a member access expression in C++,
provided nested-name-specifier results for base classes (only), rather
than everything that could possibly be a nested-name-specifier.

llvm-svn: 93398
2010-01-14 01:17:14 +00:00
Douglas Gregor c580c5205f Switch code-completion for ordinary names over to the new(ish)
LookupVisibleDecls, unifying the name lookup mechanisms used by code
completion and typo correction. Aside from the software-engineering
improvements, this makes code-completion see through using directives
and see ivars when performing unqualified name lookup in an
Objective-C instance method.

llvm-svn: 93397
2010-01-14 01:09:38 +00:00
John McCall a1709fd822 Improve the diagnostic for bad conversions in overload resolution to talk
about 'object argument' vs. 'nth argument'.

llvm-svn: 93395
2010-01-14 00:56:20 +00:00
Jakob Stoklund Olesen bff090648b Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.

This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.

Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.

llvm-svn: 93393
2010-01-14 00:54:10 +00:00
John McCall 9015cde4dc Add the %ordinal format modifier for turning '1' into '1st'. Hard-coded for
English right now;  would not be impossible to grab a special format string
from the diagnostic pool and localize that way.

llvm-svn: 93390
2010-01-14 00:50:32 +00:00
Devang Patel 4274a326be Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.
llvm-svn: 93389
2010-01-14 00:48:09 +00:00
Douglas Gregor e0717ab39c More refactoring of ResultBuilder::MaybeAddResult. No intended
functionality change.

llvm-svn: 93386
2010-01-14 00:41:07 +00:00
Devang Patel 934661ed73 Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
llvm-svn: 93383
2010-01-14 00:36:21 +00:00
Fariborz Jahanian e2dd5428e6 Fix a bug in rewrite whereby functions using blocks put extern "C" in wrong place.
Fixes radar 7284618.

llvm-svn: 93382
2010-01-14 00:35:56 +00:00
Stuart Hastings e355daf7b0 Erm, previous patch was wrong; Thanks Bill\!
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings b65256c414 Enable assertions by default for Apple-style builds.
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Douglas Gregor 7c208616b4 Refactor the "is this declaration interesting" logic in
code-completion's ResultBuilder::MaybeAddResult for later reuse.

llvm-svn: 93379
2010-01-14 00:20:49 +00:00
Douglas Gregor 0235c4243f Look through using declarations when determining whether one decl hides another
llvm-svn: 93378
2010-01-14 00:06:47 +00:00
John McCall e4d5432136 Perform format-expansion on %select results.
llvm-svn: 93377
2010-01-13 23:58:20 +00:00
Douglas Gregor f98e6a28e4 Banish the notion of a "rank" for code-completion results, since we
are no longer using it for anything. No intended functionality change.

llvm-svn: 93376
2010-01-13 23:51:12 +00:00
Chris Lattner 3eb76c23dd this is an SSE-specific issue.
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner fb534d97b5 X86 if conversion + tail merging issues from PR6032.
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Douglas Gregor 52ce62f069 Improve the sorting of code-completion results. We now always sort by
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)

llvm-svn: 93370
2010-01-13 23:24:38 +00:00
Bill Wendling ad7a5b07a7 When the visitSub method was split into visitSub and visitFSub, this xform was
added to the FSub version. However, the original version of this xform guarded
against doing this for floating point (!Op0->getType()->isFPOrFPVector()).

This is causing LLVM to perform incorrect xforms for code like:

void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){
  double mh, ml;
  double c = 134217729.0;
  double up, u1, u2, vp, v1, v2;
        
  up = xh*c;
  u1 = (xh - up) + up;
  u2 = xh - u1;
        
  vp = yh*c;
  v1 = (yh - vp) + vp;
  v2 = yh - v1;
        
  mh = xh*yh;
  ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2);
  ml += xh*yl + xl*yh;
        
  *rhi = mh + ml;
  *rlo = (mh - (*rhi)) + ml;
}

The last line was optimized away, but rl is intended to be the difference
between the infinitely precise result of mh + ml and after it has been rounded
to double precision.

llvm-svn: 93369
2010-01-13 23:23:17 +00:00
John McCall e8c8cd2a58 Don't report ambiguities in the user-defined conversion if we weren't supposed
to be considering user-defined conversions in the first place.

Doug, please review;  I'm not sure what we should be doing if we see a real
ambiguity in selecting a copy constructor when otherwise suppressing
user-defined conversions.

Fixes PR6014.

llvm-svn: 93365
2010-01-13 22:30:33 +00:00
Tobias Grosser e77d17b73a Add getSource() to SuccIterator
Get the source BB of an iterator.

llvm-svn: 93364
2010-01-13 22:21:43 +00:00
Tobias Grosser ad3f4bd6f9 Extend SuccIterator
Implement most of the missing methods to make SuccIterator random access.
operator[] is still missing.

llvm-svn: 93363
2010-01-13 22:21:28 +00:00
John McCall 02bc54d11c Don't a.k.a. through the primary typedef of an anonymous tag decl.
llvm-svn: 93362
2010-01-13 22:07:44 +00:00
Douglas Gregor 48d462573d Code-completion for @public, @protected, @private, @package.
llvm-svn: 93361
2010-01-13 21:54:15 +00:00
Chris Lattner fb40a8e5f1 this test requires SSE, thanks to jyasskin for pointing this out.
llvm-svn: 93360
2010-01-13 21:51:41 +00:00
Ted Kremenek d5c6eafe09 Reorganize CIndex.cpp into clearer sections of functions, and add a utility function 'MakeCXCursor' to centralize the logic for creating CXCursor objects.
llvm-svn: 93359
2010-01-13 21:46:36 +00:00
Fariborz Jahanian d0bbf66895 Fixes a rewrite bug rewriting a block call argument which has a trvial
constructor. Fixes radar 7537770.

llvm-svn: 93358
2010-01-13 21:41:11 +00:00
Chris Lattner 4cfd5835c9 makeNameProper is now private!
llvm-svn: 93357
2010-01-13 21:31:39 +00:00
Chris Lattner ccbeed2af4 fix ELF section mangling stuff for weak symbols to not use
obsolete Mangler interfaces.

llvm-svn: 93356
2010-01-13 21:29:21 +00:00
Victor Hernandez 9c203e362a Fix comment typo
llvm-svn: 93355
2010-01-13 21:25:04 +00:00
Douglas Gregor f193416359 Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).

llvm-svn: 93354
2010-01-13 21:24:21 +00:00
Mike Stump 6f0bf82622 Fix Release-Asserts.
llvm-svn: 93353
2010-01-13 21:23:04 +00:00
Chris Lattner b9d1f5a006 tidy
llvm-svn: 93352
2010-01-13 21:21:29 +00:00
Chris Lattner 51d6cc4bdb reduce duplicate mangling logic by using MCSymbol::printMangledName.
llvm-svn: 93351
2010-01-13 21:12:34 +00:00
Chris Lattner 8361006264 expose a static function as a static method on the MCSymbol class.
llvm-svn: 93350
2010-01-13 21:09:59 +00:00
Johnny Chen b34888b6d0 Fixed a couple of places for Thumb MOV where encoding bits are underspecified.
llvm-svn: 93349
2010-01-13 21:00:26 +00:00
Mike Stump 8521f06ced Fix for Release-Assert.
llvm-svn: 93348
2010-01-13 20:58:35 +00:00
Mike Stump 2f7b246a47 Fix for Release-Asserts.
llvm-svn: 93347
2010-01-13 20:57:29 +00:00
Mike Stump 5c1e7259f1 Fix Release-Asserts.
llvm-svn: 93346
2010-01-13 20:43:31 +00:00
Anders Carlsson 20871481d2 Add a BaseSubobject class to uniquely identify a base class subobject. Not yet used.
llvm-svn: 93345
2010-01-13 20:11:15 +00:00
John McCall e8595036c4 Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.

llvm-svn: 93344
2010-01-13 20:03:27 +00:00
Ted Kremenek e14e372b67 Add 'referringDecl' field to CXCursor to prepare the way to better model declaration references from other delcarations.
llvm-svn: 93343
2010-01-13 19:59:20 +00:00
Jakob Stoklund Olesen fcf91ee403 Fix pasto
llvm-svn: 93342
2010-01-13 19:54:39 +00:00
Chris Lattner c5b7dcf552 stop the CBE from using deprecated Mangler stuff.
llvm-svn: 93341
2010-01-13 19:54:07 +00:00
Mike Stump 92d487712e Fix for Release-Asserts.
llvm-svn: 93340
2010-01-13 19:40:37 +00:00
Victor Hernandez b00a6beef6 Write function-local metadata as a metadata subblock of a funciton block
llvm-svn: 93339
2010-01-13 19:37:33 +00:00