- Jul 23, 2011
-
-
Chris Lattner authored
them into the clang namespace. llvm-svn: 135852
-
- Jul 21, 2011
-
-
Bruno Cardoso Lopes authored
llvm-svn: 135675
-
- Jul 19, 2011
-
-
Chad Rosier authored
llvm-svn: 135510
-
Chad Rosier authored
arch-pc-win32-macho (e.g., x86_64-pc-win32-macho), which appears to be a false positive. rdar://9786307 llvm-svn: 135502
-
Douglas Gregor authored
source locations from source locations loaded from an AST/PCH file. Previously, loading an AST/PCH file involved carefully pre-allocating space at the beginning of the source manager for the source locations and FileIDs that correspond to the prefix, and then appending the source locations/FileIDs used for parsing the remaining translation unit. This design forced us into loading PCH files early, as a prefix, whic has become a rather significant limitation. This patch splits the SourceManager space into two parts: for source location "addresses", the lower values (growing upward) are used to describe parsed code, while upper values (growing downward) are used for source locations loaded from AST/PCH files. Similarly, positive FileIDs are used to describe parsed code while negative FileIDs are used to file/macro locations loaded from AST/PCH files. As a result, we can load PCH/AST files even during parsing, making various improvemnts in the future possible, e.g., teaching #include <foo.h> to look for and load <foo.h.gch> if it happens to be already available. This patch was originally written by Sebastian Redl, then brought forward to the modern age by Jonathan Turner, and finally polished/finished by me to be committed. llvm-svn: 135484
-
- Jul 14, 2011
-
-
Chris Lattner authored
llvm-svn: 135170
-
Chris Lattner authored
llvm-svn: 135166
-
- Jul 12, 2011
-
-
Bruno Cardoso Lopes authored
specified, 128 avx code is used and we're not sure yet if this the behavior we want (and if it does, some improvements are needed before relying on it). llvm-svn: 134939
-
Bruno Cardoso Lopes authored
llvm-svn: 134935
-
- Jul 11, 2011
-
-
Chandler Carruth authored
When two different types has the same text representation in the same diagnostic message, print an a.k.a. after the type if the a.k.a. gives extra information about the type. class versa_string; typedef versa_string string; namespace std {template <typename T> class vector;} using std::vector; void f(vector<string> v); namespace std { class basic_string; typedef basic_string string; template <typename T> class vector {}; void g() { vector<string> v; f(v); } } Old message: ---------------- test.cc:15:3: error: no matching function for call to 'f' f(&v); ^ test.cc:7:6: note: candidate function not viable: no known conversion from 'vector<string>' to 'vector<string>' for 1st argument void f(vector<string> v); ^ 1 error generated. New message: --------------- test.cc:15:3: error: no matching function for call to 'f' f(v); ^ test.cc:7:6: note: candidate function not viable: no known conversion from 'vector<string>' (aka 'std::vector<std::basic_string>') to 'vector<string>' (aka 'std::vector<versa_string>') for 1st argument void f(vector<string> v); ^ 1 error generated. llvm-svn: 134904
-
- Jul 09, 2011
-
-
Eli Friedman authored
Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__. clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much. <rdar://problem/9694837> llvm-svn: 134770
-
- Jul 08, 2011
-
-
Evan Cheng authored
change. Previously clang was passing the following feature strings to the ARM backend when CPU is cortex-a8: +neon,-vfp2,-vfp3 This used to work because -vfp2,-vfp3 had no effect after +neon. Now that the features are controlled by individual bits (with implied hierarchy), the net effect is all three features will be turned off. llvm-svn: 134691
-
Chandler Carruth authored
instantiation and improve diagnostics which are stem from macro arguments to trace the argument itself back through the layers of macro expansion. This requires some tricky handling of the source locations, as the argument appears to be expanded in the opposite direction from the surrounding macro. This patch provides helper routines that encapsulate the logic and explain the reasoning behind how we step through macros during diagnostic printing. This fixes the rest of the test cases originially in PR9279, and later split out into PR10214 and PR10215. There is still some more work we can do here to improve the macro backtrace, but those will follow as separate patches. llvm-svn: 134660
-
Eric Christopher authored
Fixes PR10299 and rdar://9740322 llvm-svn: 134654
-
- Jul 07, 2011
-
-
Argyrios Kyrtzidis authored
Move SourceManager::isAt[Start/End]OfMacroInstantiation functions to the Lexer, since they depend on it now. llvm-svn: 134644
-
Joerg Sonnenberger authored
llvm-svn: 134619
-
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
-
- Jul 06, 2011
-
-
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
-
Joerg Sonnenberger authored
llvm-svn: 134490
-
Fariborz Jahanian authored
passed to it, and unknown selectors causing potential leak. // rdar://9659270 llvm-svn: 134449
-
- Jul 05, 2011
-
-
Eli Friedman authored
llvm-svn: 134443
-
Joerg Sonnenberger authored
llvm-svn: 134425
-
Joerg Sonnenberger authored
llvm-svn: 134422
-
Joerg Sonnenberger authored
llvm-svn: 134411
-
Joerg Sonnenberger authored
llvm-svn: 134410
-
Joerg Sonnenberger authored
llvm-svn: 134399
-
- Jul 04, 2011
-
-
Joerg Sonnenberger authored
llvm-svn: 134393
-
Joerg Sonnenberger authored
llvm-svn: 134392
-
- Jul 02, 2011
-
-
Eric Christopher authored
Fixes rdar://9714064 llvm-svn: 134292
-
Douglas Gregor authored
llvm-svn: 134283
-
- Jun 29, 2011
-
-
Bob Wilson authored
llvm-svn: 134070
-
- Jun 28, 2011
-
-
Eric Christopher authored
Fixes rdar://9281377 llvm-svn: 134016
-
- Jun 24, 2011
-
-
Argyrios Kyrtzidis authored
is at the first token but that the location's offset is not inside the token as well. llvm-svn: 133800
-
- Jun 21, 2011
-
-
Jay Foad authored
use the deprecated forms of llvm::StringMap::GetOrCreateValue(). llvm-svn: 133515
-
Eric Christopher authored
register aliases. Fixes unnecessary renames of clobbers. Fixes part of rdar://9425559 llvm-svn: 133485
-
- Jun 17, 2011
-
-
John McCall authored
__bridge_retain as a synonym for __bridge_retained. llvm-svn: 133295
-
Eric Christopher authored
Part of rdar://9197685 llvm-svn: 133225
-