- Jul 07, 2011
-
-
Nick Lewycky authored
function. Fixes PR10233! llvm-svn: 134634
-
Fariborz Jahanian authored
object to a __weak object/type. // rdar://9732636. This is objc side of things. objc++ side tbd. llvm-svn: 134624
-
Argyrios Kyrtzidis authored
llvm-svn: 134621
-
Joerg Sonnenberger authored
llvm-svn: 134619
-
Douglas Gregor authored
clang_codeCompleteGetContexts(), that provides the client with information about the context in which code completion has occurred and what kinds of entities make sense as completions at that point. Patch by Connor Wakamo! llvm-svn: 134615
-
David Chisnall authored
If we're using the pure non-fragile ABI, then skip some of the contortions required to support the transitional ABI. llvm-svn: 134612
-
David Chisnall authored
Set a flag to tell the runtime when we're compiling in ARC mode and use the pure-nonfragile ABI for both ARC and GC mode. llvm-svn: 134611
-
John McCall authored
where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
-
Argyrios Kyrtzidis authored
llvm-svn: 134591
-
Nick Lewycky authored
llvm-svn: 134589
-
Argyrios Kyrtzidis authored
e.g. #define M(x) A x B M(##) // should expand to 'A ## B', not 'AB' llvm-svn: 134588
-
Argyrios Kyrtzidis authored
When a macro instantiation occurs, reserve a SLocEntry chunk with length the full length of the macro definition source. Set the spelling location of this chunk to point to the start of the macro definition and any tokens that are lexed directly from the macro definition will get a location from this chunk with the appropriate offset. For any tokens that come from argument expansion, '##' paste operator, etc. have their instantiation location point at the appropriate place in the instantiated macro definition (the argument identifier and the '##' token respectively). This improves macro instantiation diagnostics: Before: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:5:11: note: instantiated from: int y = M(/); ^ After: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:3:20: note: instantiated from: \#define M(op) (foo op 3); ~~~ ^ ~ t.c:5:11: note: instantiated from: int y = M(/); ^ The memory savings for a candidate boost library that abuses the preprocessor are: - 32% less SLocEntries (37M -> 25M) - 30% reduction in PCH file size (900M -> 635M) - 50% reduction in memory usage for the SLocEntry table (1.6G -> 800M) llvm-svn: 134587
-
Argyrios Kyrtzidis authored
It would add up relative (decomposed) offsets like in getDecomposedSpellingLocSlowCase, but while it makes sense to preserve the offset among lexed spelling locations, it doesn't make sense to add anything to the offset of the instantiation location. The instantiation location will be the same regardless of the relative offset in the tokens that were instantiated. This bug didn't actually affect anything because, currently, in practice we never create macro locations with relative offset greater than 0. llvm-svn: 134586
-
Argyrios Kyrtzidis authored
llvm-svn: 134585
-
Nick Lewycky authored
expressions. llvm-svn: 134583
-
Eli Friedman authored
llvm-svn: 134578
-
Chandler Carruth authored
rather than a computed std::distance(). At some point I had convinced myself that these two were different; but as far as I can tell on re-exampination they aren't, and the number of block IDs is actually just a count of the blocks in the CFG. While this removes the primary motivation for guarding all of this with CollectStats, I have a patch coming up that will almost certainly make it important again. llvm-svn: 134552
-
Douglas Gregor authored
throw-expressions, such that we don't consider the NRVO when the non-volatile automatic object comes from outside the innermost try scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were incorrect but it didn't matter because IR generation doesn't actually apply the NRVO here. In C++0x, however, we were moving from an object when in fact we should have copied from it. Fixes PR10142 / <rdar://problem/9714312>. llvm-svn: 134548
-
- Jul 06, 2011
-
-
-
Fariborz Jahanian authored
llvm-svn: 134529
-
Fariborz Jahanian authored
classes which are incompatible with weak references. // rdar://9693477 llvm-svn: 134522
-
Douglas Gregor authored
declaration with dependent type. Fixes PR10232 / <rdar://problem/9700653>. llvm-svn: 134515
-
Douglas Gregor authored
clang_saveTranslationUnit() to save a PCH file if the only errors it contains are recoverable errors. Fixes <rdar://problem/9727804>. llvm-svn: 134503
-
Benjamin Kramer authored
The small number of elements was determined by taking the median file length in clang+llvm and /usr/include on OS X with xcode installed. llvm-svn: 134496
-
Douglas Gregor authored
between different classes of errors. Addresses most of <rdar://problem/9660328>. llvm-svn: 134495
-
Chandler Carruth authored
Special detail is added for uninitialized variable analysis as this has serious performance problems than need to be tracked. Computing some of this data is expensive, for example walking the CFG to determine its size. To avoid doing that unless the stats data is going to be used, we thread a bit into the Sema object to track whether detailed stats should be collected or not. This bit is used to avoid computations whereever the computations are likely to be more expensive than checking the state of the flag. Thus, counters are in some cases unconditionally updated, but the more expensive (and less frequent) aggregation steps are skipped. With this patch, we're able to see that for 'gcc.c': *** Analysis Based Warnings Stats: 232 functions analyzed (0 w/o CFGs). 7151 CFG blocks built. 30 average CFG blocks per function. 1167 max CFG blocks per function. 163 functions analyzed for uninitialiazed variables 640 variables analyzed. 3 average variables per function. 94 max variables per function. 96409 block visits. 591 average block visits per function. 61546 max block visits per function. And for the reduced testcase in PR10183: *** Analysis Based Warnings Stats: 98 functions analyzed (0 w/o CFGs). 8526 CFG blocks built. 87 average CFG blocks per function. 7277 max CFG blocks per function. 68 functions analyzed for uninitialiazed variables 1359 variables analyzed. 19 average variables per function. 1196 max variables per function. 2540494 block visits. 37360 average block visits per function. 2536495 max block visits per function. That last number is the somewhat scary one that indicates the problem in PR10183. llvm-svn: 134494
-
Douglas Gregor authored
obey the objc_method_family attribute when provided. Fixes <rdar://problem/9726279>. llvm-svn: 134493
-
Rafael Espindola authored
instantiating functions. Fixes PR10272. llvm-svn: 134491
-
Joerg Sonnenberger authored
llvm-svn: 134490
-
John McCall authored
variadic argument pack expansions as having changed, rather than doing it for each changed expansion, which leaves out zero-argument packs with catastrophic consequences. Fixes PR10260. llvm-svn: 134483
-
John McCall authored
as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. llvm-svn: 134479
-
John McCall authored
of an enum specifier in dialects which permit fixed underlying types. Fixes the rejects-valid part of PR10264. llvm-svn: 134468
-
John McCall authored
Restore it. llvm-svn: 134459
-
John McCall authored
exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
-
John McCall authored
llvm-svn: 134455
-
Fariborz Jahanian authored
llvm-svn: 134454
-
John McCall authored
structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
-
Fariborz Jahanian authored
passed to it, and unknown selectors causing potential leak. // rdar://9659270 llvm-svn: 134449
-
Dan Gohman authored
hardwired into the default pass list. llvm-svn: 134445
-
- Jul 05, 2011
-
-
Eli Friedman authored
llvm-svn: 134443
-