- Feb 19, 2009
-
-
Daniel Dunbar authored
situation where a tentative decl was emitted *after* the actual initialization. This occurs in some rare situations with static decls. - PR3613. - I'm not particularly happy with this fix, but I don't see a simpler or more elegant solution yet. llvm-svn: 65018
-
- Feb 17, 2009
-
-
Daniel Dunbar authored
- Renamed to getDeclAlignInBytes since most other query functions work in bits. - Fun to track down as isIntegerConstantExpr was getting it right, but Evaluate() was getting it wrong. Maybe we should assert they compute the same thing when they succeed? llvm-svn: 64828
-
Daniel Dunbar authored
IRgen no longer relies on isConstantInitializer, instead we just try to emit the constant. If that fails then in C we emit an error unsupported (this occurs when Sema accepted something that it doesn't know how to fold, and IRgen doesn't know how to emit) and in C++ we emit a guarded initializer. This ends up handling a few more cases, because IRgen was actually able to emit some of the constants Sema accepts but can't Evaluate(). For example, PR3398. llvm-svn: 64780
-
- Feb 16, 2009
-
-
Daniel Dunbar authored
- Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. llvm-svn: 64689
-
Daniel Dunbar authored
- Fix test case to not only have negative tests. llvm-svn: 64674
-
Douglas Gregor authored
prototype, synthesize ParmVarDecls for prototype-less FunctionDecl. llvm-svn: 64666
-
- Feb 15, 2009
-
-
Daniel Dunbar authored
llvm-svn: 64599
-
- Feb 14, 2009
-
-
Daniel Dunbar authored
important for both keeping the generated LLVM simple and for ensuring that integer types are passed/promoted correctly. llvm-svn: 64529
-
-
Douglas Gregor authored
etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. llvm-svn: 64504
-
- Feb 13, 2009
-
-
Daniel Dunbar authored
llvm-svn: 64502
-
Daniel Dunbar authored
- PR3566 llvm-svn: 64492
-
Daniel Dunbar authored
- Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly llvm-svn: 64488
-
Anders Carlsson authored
llvm-svn: 64445
-
Douglas Gregor authored
llvm-svn: 64425
-
Douglas Gregor authored
ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. llvm-svn: 64413
-
Daniel Dunbar authored
llvm-svn: 64411
-
- Feb 12, 2009
-
-
Daniel Dunbar authored
llvm-svn: 64380
-
Daniel Dunbar authored
llvm-svn: 64368
-
- Feb 11, 2009
-
-
Chris Lattner authored
finishing off rdar://6520707 llvm-svn: 64295
-
- Feb 10, 2009
-
-
Anders Carlsson authored
llvm-svn: 64252
-
Daniel Dunbar authored
llvm-svn: 64195
-
Daniel Dunbar authored
ABI. llvm-svn: 64187
-
- Feb 09, 2009
-
-
Anders Carlsson authored
llvm-svn: 64173
-
Daniel Dunbar authored
llvm-svn: 64168
-
- Feb 06, 2009
-
-
Daniel Dunbar authored
llvm-svn: 63952
-
- Feb 05, 2009
-
-
Daniel Dunbar authored
scalar/complex/aggregate cases. - Currently disabled for x86_64, triggering a misoptimization (PR3489). llvm-svn: 63864
-
- Feb 04, 2009
-
-
Daniel Dunbar authored
llvm-svn: 63777
-
Daniel Dunbar authored
llvm-svn: 63679
-
- Feb 03, 2009
-
-
Daniel Dunbar authored
types. llvm-svn: 63669
-
- Jan 30, 2009
-
-
Douglas Gregor authored
error, since both C99 and C++ consider it an error. For reference, GCC makes this a warning while G++ makes it an error. llvm-svn: 63435
-
Anders Carlsson authored
llvm-svn: 63394
-
Nuno Lopes authored
llvm-svn: 63390
-
- Jan 29, 2009
-
-
Douglas Gregor authored
represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. llvm-svn: 63317
-
Daniel Dunbar authored
llvm-svn: 63280
-
- Jan 28, 2009
-
-
Daniel Dunbar authored
- Merged into single ComplexEvaluator, these share too much logic to be worth splitting for float/int (IMHO). Will split on request. llvm-svn: 63248
-
Nuno Lopes authored
llvm-svn: 63158
-
- Jan 27, 2009
-
-
Anders Carlsson authored
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 llvm-svn: 63127
-
Chris Lattner authored
llvm-svn: 63117
-
Daniel Dunbar authored
builtins-x86.c. llvm-svn: 63069
-