NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
- These functions are both (a) very commonly called and (b) excellent
candidates for CSE in the callers in which they are commonly used.
- That isHalfType() is hot makes me sad, but it is trivially when inlined (and
a huge waste of time when not!!!).
- The extra IsEnumDeclComplete() function is a hack to break the cycle between
Type.h and Decl.h, I'm not sure of how to do this more cleanly, but am open
to ideas.
llvm-svn: 152126
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.
llvm-svn: 152098
considered for inlining to 200 BBs.
Setting the max to 10 BBs introduced several false negatives, we'll
reevaluate the setting later on along with other inlining heuristics.
llvm-svn: 152072
from the ASTContext.
- Doing so requires the compiler to generate null checks against the returned
result, but the BumpPtrAllocator never returns null pointers.
- The optimizer can usually eliminate such checks, but not always, so this
gives us tighter codegen in some places.
- It would be really nice if we could just use __builtin_unreachable or
something to tell the optimizer that the allocator never returns null, but
LLVM isn't currently that smart.
llvm-svn: 152060
In the included testcase, soma thinks that we already have a definition after we
see the out of line decl. Codegen puts it in a deferred list, to be output if
a use is seen. This would break when we saw an explicit template instantiation
definition, since codegen would not be notified.
This patch adds a method to the consumer interface so that soma can notify
codegen that this decl is now required.
llvm-svn: 152024
Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns
true if a given range intersects with a conditional directive block.
llvm-svn: 152018
-Add location parameter for the directives callbacks
-Skip callbacks if the directive is inside a skipped range.
-Make sure the directive callbacks are invoked in source order.
llvm-svn: 152017
- This is a more reliable default, as it behaves better on failure and also
ensures that we create *new* files (instead of reusing existing inodes). This
is useful for other applications (like lldb) which want to cache inode's to
know when a file has been rewritten.
llvm-svn: 151961
the corresponding files to avoid confusion.
This is a preparation to adding an AST-based call graph to Analysis. The
existing call graph works with indexer entries. We might be able to
refactor it to use the AST based graph in the future.
(Minimal testing here as the only example that uses the API has been
completely broken, does not compile.)
llvm-svn: 151950
command line options for inlining tuning.
This adds the option for stack depth bound as well as function size
bound.
+ minor doxygenification
llvm-svn: 151930
IndentifierTable::get() and into IdentifierTable's constructor.
This gets a 0.7% reducing on lexing time for Cocoa.h, and
about the same for PCH generation.
llvm-svn: 151854
This flag enables ThreadSanitizer instrumentation committed to llvm as r150423.
The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer.
This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet
committed and it's structure in compiler-rt is not 100% clear.
The users manual wil be changed in a separate commit.
llvm-svn: 151846
Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.
llvm-svn: 151797
Fixes PR10606.
I'm not sure if this is the best way to go about it, but
I locally enabled this code path without the msext conditional,
and all tests pass, except for test/Preprocessor/cxx_oper_keyword.cpp
which explicitly checks that operator keywords can't be redefined.
I also parsed chromium/win with a clang with and without this patch.
It introduced no new errors, but removes 43 existing errors.
llvm-svn: 151768