| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Patch by Jean-Daniel Dupas.
llvm-svn: 134414
|
|
|
|
| |
llvm-svn: 134406
|
|
|
|
|
|
| |
ArchLinux. =/ Fixes PR10246.
llvm-svn: 134299
|
|
|
|
| |
llvm-svn: 134283
|
|
|
|
|
|
|
|
|
|
|
| |
CompilerInvocation on the stack, because other objects (e.g., the
CompilerInstance) maintain an intrusive reference-counted pointer to
the CompilerInvocation. This doesn't matter in the normal case,
because we take back the CompilerInvocation. However, during crash
recovery, this leads to us trying to free an object on the stack, and
hilarity ensues. Fixes <rdar://problem/9652540>.
llvm-svn: 134245
|
|
|
|
|
|
| |
replacing -freset-local-blocks. // rdar://9227352
llvm-svn: 134082
|
|
|
|
|
|
|
| |
wipe out stack blocks when they go out of scope.
// rdar://9227352
llvm-svn: 134045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function-style macros, by not recursively printing notes for other 'instantiated from' notes.
This is a one line fix here:
+ // Don't print recursive instantiation notes from an instantiation note.
+ Loc = SM.getSpellingLoc(Loc);
While here, fix the testcase to be more precise (it got filecheck'ized
brutally), and fix EmitCaretDiagnostic to be private and to not pass down
the unused 'Level' argument.
llvm-svn: 133993
|
|
|
|
| |
llvm-svn: 133911
|
|
|
|
|
|
|
|
| |
the caret location
points to a macro instantiation.
llvm-svn: 133802
|
|
|
|
|
|
|
|
| |
'ownership', not 'lifetime'.
rdar://9477613.
llvm-svn: 133779
|
|
|
|
|
|
|
|
|
|
|
| |
This is the only usage in clang's headers, and it's for a define
that only exists on CMake builds for the sake of the MSVC compiler,
so just use an ifdef instead.
Also add an include for config.h in a file that actually needs it,
and was picking it up by accident indirectly.
llvm-svn: 133710
|
|
|
|
| |
llvm-svn: 133633
|
|
|
|
|
|
|
|
| |
use an "IgnoreSysRoot" argument. HeaderSearchOptions had been using the
opposite form with "IsSysRootRelative", which made for much confusion when
looking at true/false values in calls in AddPath. No functional change.
llvm-svn: 133550
|
|
|
|
|
|
|
|
|
| |
The -cxx-isystem path is not prefixed with the sysroot directory, so it's
not a good way for the driver to set the system default C++ search path.
Instead, add -stdlib as a cc1 option and teach the frontend how to find the
headers. The driver can then just pass -stdlib through to "cc1".
llvm-svn: 133547
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Changes bit-field access policy to try to use (aligned) register sized accesses.
The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.
--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret
$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--
llvm-svn: 133532
|
|
|
|
|
|
| |
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
|
|
|
|
|
|
|
| |
an assembly file it worked correctly, while for a .c file it would given an
error about how --noexecstack is not a supported argument to -Wa.
llvm-svn: 133489
|
|
|
|
| |
llvm-svn: 133437
|
|
|
|
|
|
|
|
| |
initialization of SourceManager
because it is going to modify the input file.
llvm-svn: 133323
|
|
|
|
|
|
| |
hoped it would be.
llvm-svn: 133315
|
|
|
|
|
|
|
|
|
| |
situations
because the Angled directories and the System directories were not being uniqued
together, breaking #include_next. I'll see about a testcase, but it will be insane.
llvm-svn: 133212
|
|
|
|
| |
llvm-svn: 133211
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are somewhat special in that they wrap any other FrontendAction,
running various ARC transformations or checks prior to the standard
action's run. To implement them easily, this extends FrontendAction to
have a WrapperFrontendAction utility class which forwards all calls by
default to an inner action setup at construction time. This is then
subclassed to override the specific behavior needed by the different
ARCMT tools.
Finally, FrontendTool is taught how to create these wrapper actions from
the existing flags and options structures.
The result is that clangFrontend no longer depends on clangARCMigrate.
This is very important, as clangARCMigrate *heavily* depends on
clangFrontend. Fundamentally ARCMigrate is at the same layer as
a library like Rewrite, sitting firmly on top of the Frontend, but tied
together with the FrontendTool when building the clang binary itself.
llvm-svn: 133161
|
|
|
|
|
|
|
| |
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.
llvm-svn: 133156
|
|
|
|
|
|
| |
them only on Darwin tool chains.
llvm-svn: 133112
|
|
|
|
|
|
| |
for this.
llvm-svn: 133104
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
| |
inference, to be used (only) by the Objective-C rewriter.
llvm-svn: 133025
|
|
|
|
|
|
| |
reason to allow the user to control these semantics through a flag.
llvm-svn: 132919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
|
|
|
| |
llvm-svn: 132855
|
|
|
|
|
|
|
| |
-undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't
ask.)
llvm-svn: 132708
|
|
|
|
| |
llvm-svn: 132653
|
|
|
|
| |
llvm-svn: 132651
|
|
|
|
|
|
| |
passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.
llvm-svn: 132570
|
|
|
|
|
|
| |
places this is a problem.
llvm-svn: 132542
|
|
|
|
|
|
|
|
| |
Patch by Tobias Hunger!
Fixes PR10008
llvm-svn: 132541
|
|
|
|
| |
llvm-svn: 132460
|
|
|
|
|
|
| |
control of f/fno-diagnostics-show-note-include-stack flags. This should help with reducing diagnostic spew from macros instantiations.
llvm-svn: 132143
|
|
|
|
|
|
|
|
|
| |
Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.
Depends on llvm commit r132046.
llvm-svn: 132047
|
|
|
|
|
|
| |
from -I and paths that come from -system. Patch from Paul Holden!
llvm-svn: 131955
|
|
|
|
|
|
| |
and stop abusing the multi-level dereference isa<> used to allow.
llvm-svn: 131804
|
|
|
|
|
|
|
|
|
|
|
|
| |
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.
Note that we no longer change the diagnostic format based on
-fms-extensions.
Patch by Andrew Fish!
llvm-svn: 131794
|
|
|
|
|
|
| |
Patch by Ismail Dönmez!
llvm-svn: 131636
|
|
|
|
| |
llvm-svn: 131505
|
|
|
|
| |
llvm-svn: 131108
|
|
|
|
|
|
|
|
|
|
|
| |
extension.
http://msdn.microsoft.com/en-us/library/hzc8ytsz(v=VS.100).aspx
Microsoft doc claims this is a C++/CLI feature but it is really always enabled.
This removes 2 error when parsing MFC code with clang.
llvm-svn: 131051
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)
This fixes the bug that we weren't catching
void foo() = delete;
void foo() {}
as being a redefinition.
llvm-svn: 131013
|