#
882034dd |
| 26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
indenting and other minor things.
llvm-svn: 52764
|
#
87ab27d4 |
| 26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
give CreateObjCRuntime a full CGM so it can get whatever state it needs, instead of passing in just a couple random things it currently happens to use.
llvm-svn: 52756
|
Revision tags: llvmorg-2.3.0 |
|
#
b6f79538 |
| 08-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement the alias attirbute (in both Sema and Codegen)
llvm-svn: 52092
|
#
158143ad |
| 05-Jun-2008 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Emit debug information for global and static variables when -g is specified.
llvm-svn: 51993
|
#
2425cd81 |
| 04-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
For setting attributes, don't assume there are ParamVarDecls available, because trying to access non-existent ParamVarDecls can crash. Testcase from the original source for PR2414.
llvm-svn: 51960
|
#
f6b091f7 |
| 01-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
First cut at setting attributes for functions and calls; this puts us much closer to passing the gcc struct layout tests.
It might be possible to refactor this a bit, but I'm not sure there's actu
First cut at setting attributes for functions and calls; this puts us much closer to passing the gcc struct layout tests.
It might be possible to refactor this a bit, but I'm not sure there's actually enough common code for that to be useful.
To get the calling convention completely correct, a bit of platform-specific code is necessary even for x86-Linux. On x86-Linux, the alignment of function parameters is extremely strange; as far as I can tell, it's always 4 except for SSE vectors or structs containing SSE vectors. I'm continuing to investigate this.
llvm-svn: 51839
show more ...
|
#
1200aca7 |
| 01-Jun-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Support for code generation of Objective-C top-level language constructs. Implemented by David Chisnall!
llvm-svn: 51835
|
#
6859a1b9 |
| 30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
PR1893: Fix up the type of tentative definitions of incomplete array types so that they end up the correct size.
llvm-svn: 51787
|
#
c18d9d53 |
| 30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Allow the type of a global to be different from the type of its associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving p
Allow the type of a global to be different from the type of its associated declaration. This is a prerequisite to handling general union initializations; for example, an array of unions involving pointers has to be turned into a struct because the elements can have incompatible types.
I refactored the code a bit to make it more readable; now, the logic for definitions is all in EmitGlobalVarInit.
The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it separately.
By itself, this patch should not cause any visible changes.
llvm-svn: 51783
show more ...
|
#
617ba48f |
| 30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Always check that the definition of a function has the correct type. This fixes a crash on the included testcase (found in NetHack).
llvm-svn: 51767
|
#
174d9c26 |
| 29-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add CodeGen support for alignment on globals, both for unusual natural alignment and alignment attributes.
llvm-svn: 51676
|
#
d72a9624 |
| 29-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Tentative declarations are supposed to have common linkage, not weak. This change makes clang generate the same thing as llvm-gcc.
llvm-svn: 51674
|
#
70f5a921 |
| 27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
The cache is working again; re-enable it.
llvm-svn: 51587
|
#
078c963a |
| 27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add a more reliable check for whether a static declaration has already been used. In preparation for the fix to PR2360, but also a minor bug in its own right.
llvm-svn: 51583
|
#
df649f3d |
| 26-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Emit memmove, not memcpy, for structure copies; this is unfortunately required for correctness in cases of copying a struct to itself or to an overlapping struct (itself for cases like *a = *a, and
Emit memmove, not memcpy, for structure copies; this is unfortunately required for correctness in cases of copying a struct to itself or to an overlapping struct (itself for cases like *a = *a, and overlapping is possible with unions).
Hopefully, this won't end up being a perf issue; LLVM *should* be able to optimize memmove to memcpy in a lot of cases, and for small copies the generated code *should* be mostly comparable. (In reality, LLVM is currently horrible at optimizing memmove, but that's a bug, not a fundamental issue.)
gcc currently generates wrong code; that's http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667.
llvm-svn: 51566
show more ...
|
#
75d69da5 |
| 22-May-2008 |
Dan Gohman <gohman@apple.com> |
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::Visibil
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library.
llvm-svn: 51398
show more ...
|
#
3ed1d5f4 |
| 20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Disable the function address cache; this doesn't have any ill effects, as far as I can tell, and it fixes code like test/CodeGen/functions.c.
(Whatever performance effect it might have, crashing on
Disable the function address cache; this doesn't have any ill effects, as far as I can tell, and it fixes code like test/CodeGen/functions.c.
(Whatever performance effect it might have, crashing on a construct like this isn't really acceptable; I've run into this multiple times.)
llvm-svn: 51312
show more ...
|
#
15cb6690 |
| 08-May-2008 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.
llvm-svn: 50848
show more ...
|
#
7b9293ba |
| 04-May-2008 |
Chris Lattner <sabre@nondot.org> |
Simplify FunctionDecl::AddRedeclaration a bit by using std::swap. Fix 'swapping' of attributes to not insert null values into the DeclAttrs map.
llvm-svn: 50612
|
#
bc22b5b3 |
| 04-May-2008 |
Chris Lattner <sabre@nondot.org> |
if a decl is both 'static' and weak or static and inline, its linkage type should be internal, not weak/linkonce.
llvm-svn: 50611
|
#
dd477ce3 |
| 30-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Verify the whole module after codegen to catch silly IR bugs.
llvm-svn: 50485
|
#
73669def |
| 25-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove the 'unused static' diagnostic from codegen. This should be reimplemented in Sema someday. This is tracked in PR2236. Until then disabling it removes some bogus diagnostics (see 2236).
ll
remove the 'unused static' diagnostic from codegen. This should be reimplemented in Sema someday. This is tracked in PR2236. Until then disabling it removes some bogus diagnostics (see 2236).
llvm-svn: 50263
show more ...
|
#
1c906206 |
| 20-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Fix PR2236 Add test Implement feedback from Chris re: PR1998
llvm-svn: 50001
|
#
8e8d498d |
| 20-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Only generate code for static functions and global variables that are actually used. Warn about unused static functions and variables. This fixes PR1998.
llvm-svn: 49987
|
#
faae0811 |
| 19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Generate code for annotation attributes.
llvm-svn: 49951
|