Commit Graph

75840 Commits

Author SHA1 Message Date
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
Victor Hernandez cad7328d8c Enumerate function-local metadata (and its types and operands) only during function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator
llvm-svn: 93338
2010-01-13 19:36:16 +00:00
Victor Hernandez 108d3acb43 Parse function-local metadata inside function blocks
llvm-svn: 93337
2010-01-13 19:34:08 +00:00
Chris Lattner 643b817d92 Use the GV version of getNameWithPrefix in TargetLoweringObjectFileCOFF::
SelectSectionForGlobal, unbreaking weak globals with no-name.

llvm-svn: 93336
2010-01-13 19:19:17 +00:00
Evan Cheng af0ad65ff2 Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
This fixes PR6027.

llvm-svn: 93335
2010-01-13 19:16:39 +00:00
Chris Lattner a9365352cf just finish MCizing FnStubInfo which cleans it up and simplifies it.
llvm-svn: 93334
2010-01-13 19:13:16 +00:00
Chris Lattner 45faea454d don't call getNameWithPrefix repeatedly and unnecesarily.
llvm-svn: 93333
2010-01-13 19:05:36 +00:00
Chris Lattner 9148f36e90 properly use MCSymbol to print the strings aquired from getNameWithPrefix.
llvm-svn: 93332
2010-01-13 19:00:57 +00:00
Fariborz Jahanian 3f7b8b274d Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).

llvm-svn: 93331
2010-01-13 18:51:17 +00:00
Ted Kremenek 95ae5e16b9 Add extra null check in clang_disposeString().
llvm-svn: 93328
2010-01-13 18:45:36 +00:00
Douglas Gregor 9de54ea41b Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

  C(int); // constructor

and

  C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

  C::C C::f(int); // error: C::C refers to the constructor name, but
                  // we complain nicely and recover by treating it as
                  // a type.

llvm-svn: 93322
2010-01-13 17:31:36 +00:00
Douglas Gregor b89b99f1f2 Fix pasto in __has_feature(cxx_lambdas) docs
llvm-svn: 93320
2010-01-13 16:27:49 +00:00
Daniel Dunbar dcf5a317f1 Tidy up comments, remove whitespace, and rename 'print-%' make debugging target
to 'make-print-%' to match LLVM.

llvm-svn: 93319
2010-01-13 16:13:01 +00:00
Daniel Dunbar debb79b994 Sink {config.h,ConfigureChecks}.cmake into cmake directory.
llvm-svn: 93318
2010-01-13 16:12:49 +00:00
Benjamin Kramer 2e06b93f43 Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.

llvm-svn: 93317
2010-01-13 12:45:23 +00:00
John McCall 6a61b5203d Record some basic information about bad conversion sequences. Use that
information to feed diagnostics instead of regenerating it.  Much room for
improvement here, but fixes some unfortunate problems reporting on method calls.

llvm-svn: 93316
2010-01-13 09:16:55 +00:00
Alexis Hunt c88db06565 Implement semantic checking for C++ literal operators.
This now rejects literal operators that don't meet the requirements.
Templates are not yet checked for.

llvm-svn: 93315
2010-01-13 09:01:02 +00:00
Alexis Hunt 10e2f7264e Update test function names so as not to use potential keywords.
llvm-svn: 93314
2010-01-13 08:58:42 +00:00
Evan Cheng b5499d09d1 Re-enable extension optimization pass.
llvm-svn: 93313
2010-01-13 08:45:40 +00:00
Alexis Hunt af4e28d897 Add a bunch more feature-checking macros for C++0x features. Some of these are
disabled with the intent that users can start with them now and not have to change
a thing to have them work when we implement the features.

llvm-svn: 93312
2010-01-13 08:31:49 +00:00
Chris Lattner ede8ad45bc upgrade and MC'ize a few uses of makeNameProper.
llvm-svn: 93310
2010-01-13 08:08:33 +00:00