Daniel Dunbar
6311731341
Update LINK_COMPONENTS for examples.
...
llvm-svn: 105607
2010-06-08 15:38:01 +00:00
Anders Carlsson
248704c517
Correctly mangle static variables of anonymous struct/union type.
...
llvm-svn: 105606
2010-06-08 14:49:03 +00:00
Benjamin Kramer
0591124608
Token is POD-like.
...
llvm-svn: 105604
2010-06-08 11:23:26 +00:00
Zhongxing Xu
87e7fc5dc2
Add a checker check if a global variable holds a local variable's address after
...
the function call is left where the local variable is declared.
llvm-svn: 105602
2010-06-08 10:00:00 +00:00
Nate Begeman
ae6b1d8010
Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file
...
llvm-svn: 105599
2010-06-08 06:03:01 +00:00
Jeffrey Yasskin
460aa54d0a
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.
...
llvm-svn: 105597
2010-06-08 04:56:20 +00:00
Rafael Espindola
2569885963
Add a test to the previous commit.
...
llvm-svn: 105596
2010-06-08 03:59:28 +00:00
Rafael Espindola
895e51de4a
Fix what looks like a merge problem that broke __clear_cache.
...
llvm-svn: 105595
2010-06-08 03:52:53 +00:00
Rafael Espindola
85dc7e0909
Add test for previous commit.
...
llvm-svn: 105594
2010-06-08 03:29:31 +00:00
Nate Begeman
4904e32d46
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules.
...
llvm-svn: 105593
2010-06-08 02:47:44 +00:00
Rafael Espindola
bbd44ef673
Fix passing and returning of objects with non trivial copy constructors on
...
ARM.
Fixes PR7310.
llvm-svn: 105592
2010-06-08 02:42:08 +00:00
Nate Begeman
16372afeab
Implement ARM NEON up through vcvt, alphabetically.
...
llvm-svn: 105590
2010-06-08 00:17:19 +00:00
Nate Begeman
a011002195
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.
...
llvm-svn: 105589
2010-06-08 00:16:34 +00:00
Daniel Dunbar
24e52992c0
Driver: Support invoking Clang on .ll or .bc inputs.
...
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar
6f8362c6bf
Frontend: Add CodeGenAction support for handling LLVM IR.
...
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.
For example, 'llvm-as' is:
$ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
$ clang -cc1 -emit-llvm FOO.bc -o -
and 'opt' is, e.g.:
$ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
$ clang -cc1 -S -o - FOO.ll
The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).
llvm-svn: 105583
2010-06-07 23:27:59 +00:00
Daniel Dunbar
9507f9cc05
Frontend: Add FrontendAction support for handling LLVM IR inputs.
...
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
llvm-svn: 105582
2010-06-07 23:26:47 +00:00
Daniel Dunbar
fcb2e6ddea
FrontendAction: Track active file kind.
...
llvm-svn: 105581
2010-06-07 23:25:49 +00:00
Daniel Dunbar
fa6214c952
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
llvm-svn: 105580
2010-06-07 23:24:43 +00:00
Daniel Dunbar
aed46fcbe9
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
llvm-svn: 105579
2010-06-07 23:23:50 +00:00
Daniel Dunbar
8654638b23
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
llvm-svn: 105578
2010-06-07 23:23:06 +00:00
Daniel Dunbar
9b491e79fc
Frontend: Lift InputKind enumeration to top level.
...
llvm-svn: 105577
2010-06-07 23:22:09 +00:00
Daniel Dunbar
3e11152de3
Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
...
create modules which have target data strings.
llvm-svn: 105576
2010-06-07 23:21:04 +00:00
Daniel Dunbar
f976d1b205
Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.
...
llvm-svn: 105575
2010-06-07 23:20:08 +00:00
Daniel Dunbar
6d5824f5bf
Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.
...
llvm-svn: 105574
2010-06-07 23:19:17 +00:00
Fariborz Jahanian
be21aa34a0
When using property-dot assignment syntax to call a setter method,
...
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778
llvm-svn: 105560
2010-06-07 22:02:01 +00:00
Fariborz Jahanian
a2d7c34e93
Fixed a block regression caused by trying to use
...
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
2010-06-07 19:39:39 +00:00
Jordy Rose
3597b21f20
Catch free()s on non-regions and regions known to be not from malloc(), by checking the symbol type and memory space.
...
llvm-svn: 105547
2010-06-07 19:32:37 +00:00
Rafael Espindola
a54062ef0c
Implement __clear_cache on ARM.
...
llvm-svn: 105537
2010-06-07 17:26:50 +00:00
Fariborz Jahanian
28ed927ddf
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
...
created temporary. Use own initialized entity for copied in block
variables.
llvm-svn: 105533
2010-06-07 16:14:00 +00:00
Nate Begeman
5968eb270a
weekend checkpoint of arm neon builtins codegen.
...
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.
llvm-svn: 105532
2010-06-07 16:01:56 +00:00
Jeffrey Yasskin
caa710dfd2
PR7245: Make binding a reference to a temporary without a usable copy
...
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
2010-06-07 15:58:05 +00:00
John McCall
cb0f89a434
Simplify the methods for creating a pointer, reference, member-pointer,
...
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.
llvm-svn: 105526
2010-06-05 06:41:15 +00:00
Abramo Bagnara
d73405829b
Added AccessSpecDecl node.
...
llvm-svn: 105525
2010-06-05 05:09:32 +00:00
Jeffrey Yasskin
2f96e9f5c9
Add an extension to avoid an error when a global template has the same name as
...
a member template, and you try to call the member template with an explicit
template argument. See PR7247
For example, this downgrades the error to a warning in:
template<typename T> struct set{};
struct Value {
template<typename T>
void set(T value) {
}
};
void foo() {
Value v;
v.set<double>(3.2); // Warning here.
}
llvm-svn: 105518
2010-06-05 01:39:57 +00:00
Devang Patel
6ccba0fb6e
Preserve type info for local variables in optimized builds.
...
llvm-gcc enabled this couple of weeks ago.
llvm-svn: 105516
2010-06-05 01:14:40 +00:00
John McCall
8cb7bdfd33
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
...
This is never null, but the associated type might be.
llvm-svn: 105503
2010-06-04 23:28:52 +00:00
Rafael Espindola
e971b9a260
Correctly align large arrays in x86-64. This fixes PR5599.
...
llvm-svn: 105500
2010-06-04 23:15:27 +00:00
Anders Carlsson
76f513f862
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.
...
llvm-svn: 105494
2010-06-04 22:47:55 +00:00
John McCall
a3cecb628f
Add indexing support for the block and @property type location information
...
I just implemented.
llvm-svn: 105491
2010-06-04 22:33:30 +00:00
Nate Begeman
6736cc89d0
Initial support for ARM NEON builtins, codegen up next
...
llvm-svn: 105489
2010-06-04 21:36:27 +00:00
Fariborz Jahanian
ea882cd92e
Build AST for copy-construction of copied-in
...
class object in blocks and carry it to IRGen.
llvm-svn: 105487
2010-06-04 21:35:44 +00:00
John McCall
339bb66246
Remember type source information for Objective C property declarations.
...
llvm-svn: 105484
2010-06-04 20:50:08 +00:00
Fariborz Jahanian
9643399ef0
Added a field to BlockDeclRefExpr for future use.
...
No functionality change yet.
llvm-svn: 105479
2010-06-04 19:06:53 +00:00
John McCall
8e346702b6
Preserve more information from a block's original function declarator, if one
...
was given. Remove some unnecessary accounting from BlockScopeInfo. Handle
typedef'ed function types until such time as we decide not.
llvm-svn: 105478
2010-06-04 19:02:56 +00:00
Daniel Dunbar
7f3d95054b
Driver: Change -dwarf-debug-flags option to pass the original command line
...
arguments after translation, instead of the -cc1 level arguments.
llvm-svn: 105476
2010-06-04 18:47:06 +00:00
Daniel Dunbar
6beaf5110f
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
...
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.
llvm-svn: 105475
2010-06-04 18:28:41 +00:00
Daniel Dunbar
8829962030
Driver: Add an explicit dsymutil action.
...
llvm-svn: 105474
2010-06-04 18:28:36 +00:00
Fariborz Jahanian
64176c2c97
For C++ copied in objects, use copy constructors in
...
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.
llvm-svn: 105469
2010-06-04 16:10:00 +00:00
Rafael Espindola
92eb2cbbef
Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
...
moves us further.
llvm-svn: 105468
2010-06-04 14:28:10 +00:00
John McCall
a3ccba0417
Restructure how we interpret block-literal declarators. Correctly handle
...
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.
llvm-svn: 105466
2010-06-04 11:21:44 +00:00