| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
|  | 
machines.
llvm-svn: 64354
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
to use this stat information in the PTH file using a 'StatSysCallCache' object.
Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2% 
We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.
llvm-svn: 64353
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
- set the 'StatSysCallCache' object using a setter method instead of
  FileManager's constructor. This allows the cache to be installed after the
  FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)
llvm-svn: 64351
 | 
| | 
| 
| 
|  | 
llvm-svn: 64350
 | 
| | 
| 
| 
| 
| 
|  | 
similar logic in llvm-gcc and will hopefully be fixed soon.
llvm-svn: 64349
 | 
| | 
| 
| 
|  | 
llvm-svn: 64348
 | 
| | 
| 
| 
|  | 
llvm-svn: 64347
 | 
| | 
| 
| 
|  | 
llvm-svn: 64346
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.
llvm-svn: 64345
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
complex conversions where the conversion between the real types is an
integral promotion. This is how G++ handles complex promotions for its
complex integer extension.
llvm-svn: 64344
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
system. Since C99 doesn't have overloading and C++ doesn't have
_Complex, there is no specification for    this. Here's what I think
makes sense.
Complex conversions come in several flavors:
  - Complex promotions:  a complex -> complex   conversion where the
    underlying real-type conversion is a floating-point promotion. GCC
    seems to call this a promotion, EDG does something else. This is
    given "promotion" rank for determining the best viable function.
  - Complex conversions: a complex -> complex conversion that is
    not a complex promotion. This is given "conversion" rank for
    determining the best viable   function.
  - Complex-real conversions: a real -> complex or complex -> real
    conversion. This is given "conversion" rank for determining the
    best viable function.
These rules are the same for C99 (when using the "overloadable"
attribute) and C++. However, there is one difference in the handling
of floating-point promotions: in C99, float -> long double and double
-> long double are considered promotions (so we give them "promotion" 
rank), while C++ considers these conversions ("conversion" rank).
llvm-svn: 64343
 | 
| | 
| 
| 
| 
| 
|  | 
All relevant dejagnu enocding tests pass in this mode.
llvm-svn: 64341
 | 
| | 
| 
| 
|  | 
llvm-svn: 64338
 | 
| | 
| 
| 
|  | 
llvm-svn: 64337
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This commit adds a new attribute, "overloadable", that enables C++
function overloading in C. The attribute can only be added to function
declarations, e.g.,
  int *f(int) __attribute__((overloadable));
If the "overloadable" attribute exists on a function with a given
name, *all* functions with that name (and in that scope) must have the
"overloadable" attribute. Sets of overloaded functions with the
"overloadable" attribute then follow the normal C++ rules for
overloaded functions, e.g., overloads must have different
parameter-type-lists from each other.
When calling an overloaded function in C, we follow the same
overloading rules as C++, with three extensions to the set of standard
conversions:
  - A value of a given struct or union type T can be converted to the
    type T. This is just the identity conversion. (In C++, this would
    go through a copy constructor).
  - A value of pointer type T* can be converted to a value of type U*
    if T and U are compatible types. This conversion has Conversion
    rank (it's considered a pointer conversion in C).
  - A value of type T can be converted to a value of type U if T and U
    are compatible (and are not both pointer types). This conversion
    has Conversion rank (it's considered to be a new kind of
    conversion unique to C, a "compatible" conversion).
Known defects (and, therefore, next steps):
  1) The standard-conversion handling does not understand conversions
  involving _Complex or vector extensions, so it is likely to get
  these wrong. We need to add these conversions.
  2) All overloadable functions with the same name will have the same
  linkage name, which means we'll get a collision in the linker (if
  not sooner). We'll need to mangle the names of these functions.
llvm-svn: 64336
 | 
| | 
| 
| 
| 
| 
| 
|  | 
all but one dejagnu encoding tests for darwin
pass in nonfragile abi mode.
llvm-svn: 64334
 | 
| | 
| 
| 
| 
| 
|  | 
case on x86_64.
llvm-svn: 64333
 | 
| | 
| 
| 
|  | 
llvm-svn: 64330
 | 
| | 
| 
| 
| 
| 
| 
|  | 
actually *slightly* slower than the binary search. Since this is algorithmically
better, further performance tuning should be able to make this faster.
llvm-svn: 64326
 | 
| | 
| 
| 
|  | 
llvm-svn: 64325
 | 
| | 
| 
| 
|  | 
llvm-svn: 64323
 | 
| | 
| 
| 
|  | 
llvm-svn: 64321
 | 
| | 
| 
| 
| 
| 
|  | 
selectors as the first argument
llvm-svn: 64320
 | 
| | 
| 
| 
|  | 
llvm-svn: 64318
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
for non-external names whose address becomes the template
argument. This completes C++ [temp.arg.nontype]p1.
Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs
from EDG's interpretation (we're stricter, and GCC agrees with
us). They're opening a core issue about the matter.
llvm-svn: 64317
 | 
| | 
| 
| 
|  | 
llvm-svn: 64313
 | 
| | 
| 
| 
| 
| 
|  | 
Sema to ASTContext.
llvm-svn: 64312
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
template specialization (e.g., std::vector<int> would now be
well-formed, since it relies on a default argument for the Allocator
template parameter). 
This is much less interesting than one might expect, since (1) we're
not actually using the default arguments for anything important, such
as naming an actual Decl, and (2) we'll often need to instantiate the
default arguments to check their well-formedness. The real fun will
come later.
llvm-svn: 64310
 | 
| | 
| 
| 
| 
| 
|  | 
Added a FIXME to handle 'rethrow' check.
llvm-svn: 64308
 | 
| | 
| 
| 
| 
| 
|  | 
Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers
llvm-svn: 64307
 | 
| | 
| 
| 
|  | 
llvm-svn: 64306
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
pointer-to-member-data non-type template parameters. Also, get
consistent about what it means to returned a bool from
CheckTemplateArgument.
llvm-svn: 64305
 | 
| | 
| 
| 
| 
| 
|  | 
referenced by other tables.
llvm-svn: 64304
 | 
| | 
| 
| 
|  | 
llvm-svn: 64297
 | 
| | 
| 
| 
| 
| 
| 
|  | 
subtle and non-obvious promotion rules.  We already handle += 
and +1 correctly.
llvm-svn: 64296
 | 
| | 
| 
| 
| 
| 
|  | 
finishing off rdar://6520707
llvm-svn: 64295
 | 
| | 
| 
| 
| 
| 
|  | 
SenTestCase.
llvm-svn: 64292
 | 
| | 
| 
| 
|  | 
llvm-svn: 64291
 | 
| | 
| 
| 
| 
| 
|  | 
the MXCSR register
llvm-svn: 64290
 | 
| | 
| 
| 
|  | 
llvm-svn: 64289
 | 
| | 
| 
| 
|  | 
llvm-svn: 64286
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
non-type template parameters that are references to functions or
pointers to member functions. Did a little bit of refactoring so that
these two cases, along with the handling of non-type template
parameters that are pointers to functions, are handled by the same
path. 
Also, tweaked FixOverloadedFunctionReference to cope with member
function pointers. This is a necessary step for getting all of the fun
member pointer conversions working outside of template arguments, too.
llvm-svn: 64277
 | 
| | 
| 
| 
|  | 
llvm-svn: 64276
 | 
| | 
| 
| 
|  | 
llvm-svn: 64271
 | 
| | 
| 
| 
| 
| 
| 
|  | 
template parameters that have reference type. Effectively, we're doing
a very limited form of reference binding here.
llvm-svn: 64270
 | 
| | 
| 
| 
|  | 
llvm-svn: 64268
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
non-type template parameters of pointer-to-object and
pointer-to-function type. The most fun part of this is the use of
overload resolution to pick a function from the set of overloaded
functions that comes in as a template argument.
Also, fixed two minor bugs in this area:
  - We were allowing non-type template parameters of type pointer to
  void.
  - We weren't patching up an expression that refers to an overloaded
  function set via "&f" properly.
We're still not performing complete checking of the expression to be
sure that it is referring to an object or function with external
linkage (C++ [temp.arg.nontype]p1).
llvm-svn: 64266
 | 
| | 
| 
| 
|  | 
llvm-svn: 64259
 | 
| | 
| 
| 
|  | 
llvm-svn: 64258
 | 
| | 
| 
| 
|  | 
llvm-svn: 64257
 |