| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 45106
|
|
|
|
| |
llvm-svn: 45095
|
|
|
|
| |
llvm-svn: 45094
|
|
|
|
|
|
|
| |
HeaderSearch into DirectoryLookup, as a particular framework lookup is
specific to the directory we are currently querying.
llvm-svn: 45093
|
|
|
|
|
|
|
| |
the internal representation. This also fixes a bug where -I foo -F foo would
not search foo as both a normal and framework include dir.
llvm-svn: 45092
|
|
|
|
| |
llvm-svn: 45089
|
|
|
|
| |
llvm-svn: 44976
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
llvm-svn: 44957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
llvm-svn: 44878
|
|
|
|
|
|
| |
info of each token.
llvm-svn: 44741
|
|
|
|
|
|
|
|
| |
that are builtin and those that are aren't. This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.
llvm-svn: 44473
|
|
|
|
|
|
| |
exponent but no decimal point.
llvm-svn: 44431
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NumericLiteralParser
converts a parsed literal into an APFloat. We are still performing a copy of the
string, which hopefully will be removed eventually for performance reasons. This
version now is at least safe.
Changed rounding in APFloat construction in NumericLiteralParser from rmTowardsZero
to rmNearestTiesToEven.
llvm-svn: 44422
|
|
|
|
|
|
|
|
|
|
|
| |
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.
Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).
llvm-svn: 44339
|
|
|
|
|
|
| |
Neil, please review this fix.
llvm-svn: 44285
|
|
|
|
| |
llvm-svn: 44178
|
|
|
|
| |
llvm-svn: 44120
|
|
|
|
|
|
| |
number (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) to target Leopard. This is only a short term solution, until the clang driver implements the "-mmacosx-version-min" flag (which will compute this value based on the target).
llvm-svn: 43981
|
|
|
|
|
|
|
|
|
|
|
|
| |
long standing FIXME in Sema::GetObjcIdType()).
This removes several gross hacks to work around the previous "lazy" behavior.
Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.
llvm-svn: 43567
|
|
|
|
|
|
| |
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...
llvm-svn: 43557
|
|
|
|
| |
llvm-svn: 43543
|
|
|
|
|
|
| |
generate these declaration on the fly when rewriting a message expression.
llvm-svn: 43529
|
|
|
|
| |
llvm-svn: 43505
|
|
|
|
| |
llvm-svn: 43285
|
|
|
|
|
|
|
| |
- Add setter/getter to ObjcClassDecl.
- Predefined key runtime functions.
llvm-svn: 43257
|
|
|
|
| |
llvm-svn: 43125
|
|
|
|
|
|
| |
the lexer, where it can be shared.
llvm-svn: 43090
|
|
|
|
|
|
| |
object in order to do its thing.
llvm-svn: 43084
|
|
|
|
|
|
| |
goodies from the respective test files. Moving forward, it will be very nice to assume these builtin!
llvm-svn: 43077
|
|
|
|
| |
llvm-svn: 42974
|
|
|
|
|
|
| |
place and making it correctly parameterized on the target.
llvm-svn: 42830
|
|
|
|
| |
llvm-svn: 42819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
predefined macros. Previously, these were handled by the driver,
now they are handled by the preprocessor.
Some fallout of this:
1. Instead of preprocessing two buffers (the predefines, then the
main source file) we now start preprocessing the main source
file and inject the predefines as a "psuedo #include" from the
main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
preprocessor knows, which is nice for people wanting to define
their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
for example a definition for __builtin_va_list that is
target-specific, and a typedef for id in objc.
llvm-svn: 42818
|
|
|
|
| |
llvm-svn: 42799
|
|
|
|
| |
llvm-svn: 42730
|
|
|
|
| |
llvm-svn: 42728
|
|
|
|
|
|
|
|
|
| |
Now instead of IdentifierInfo knowing anything about MacroInfo,
only the preprocessor knows. This makes MacroInfo truly private
to the Lex library (and its direct clients) instead of being
accessed in the Basic library.
llvm-svn: 42727
|
|
|
|
| |
llvm-svn: 42726
|
|
|
|
|
|
| |
call to getMacroInfo to call it.
llvm-svn: 42725
|
|
|
|
|
|
|
|
| |
(because all bitfields now fit in 32 bits). This shrinks the identifier
table for carbon.h from 1634428 to 1451424 bytes (12%) and has no impact
on compile time.
llvm-svn: 42723
|
|
|
|
|
|
|
|
|
|
| |
moves the MacroInfo pointer to a side hash table (which currently
lives in IdentifierTable.cpp). This removes a pointer from
Identifier info, but doesn't shrink it, as it requires a new bit
be added. This strange approach with the 'hasmacro' bit is needed
to not lose preprocessor performance.
llvm-svn: 42722
|
|
|
|
|
|
|
|
| |
number of arguments now and does the right thing, but the nullary/unary
accessors are preserved as convenience functions. This allows us to
slightly simplify clients.
llvm-svn: 42716
|
|
|
|
| |
llvm-svn: 42715
|
|
|
|
|
|
|
|
| |
Selector's instead of requiring void* to be used. I converted one use of
DenseSet<void*> over to use DenseSet<Selector> but the others should change
as well.
llvm-svn: 42645
|
|
|
|
|
|
|
|
|
|
|
| |
- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.
llvm-svn: 42643
|
|
|
|
|
|
| |
friend, move some methods around.
llvm-svn: 42456
|
|
|
|
|
|
|
|
|
|
|
|
| |
This motivated implementing a devious clattner inspired solution:-)
This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).
This change was critical to make now, before we have too many clients.
I still need to add some comments to the Selector class...will likely add later today/tomorrow.
llvm-svn: 42452
|
|
|
|
|
|
| |
reference.
llvm-svn: 42411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.
#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.
#3: It results in many API simplifications. Here are some highlights:
- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).
I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.
Thanks to Chris for talking this through with me and suggesting this approach.
llvm-svn: 42395
|
|
|
|
|
|
| |
so that we don't emit an error on the #endif. Suggestion by Neil.
llvm-svn: 42258
|