| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.
llvm-svn: 52914
|
|
|
|
|
|
|
| |
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).
llvm-svn: 52830
|
|
|
|
|
|
| |
we don't push strings into LLVM IR and then have to read them back out.
llvm-svn: 52765
|
|
|
|
| |
llvm-svn: 52764
|
|
|
|
|
|
| |
string to LLVM IR and then regenerating the string from IR.
llvm-svn: 52762
|
|
|
|
|
|
| |
calls to getStringValue
llvm-svn: 52761
|
|
|
|
|
|
| |
selectors instead of Value*'s.
llvm-svn: 52760
|
|
|
|
| |
llvm-svn: 52759
|
|
|
|
| |
llvm-svn: 52758
|
|
|
|
| |
llvm-svn: 52757
|
|
|
|
|
|
|
| |
instead of passing in just a couple random things it currently
happens to use.
llvm-svn: 52756
|
|
|
|
| |
llvm-svn: 52755
|
|
|
|
|
|
| |
changes in llvm mainline.
llvm-svn: 52753
|
|
|
|
| |
llvm-svn: 52707
|
|
|
|
|
|
|
|
| |
includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)."
Patch by David Chisnall!
llvm-svn: 52681
|
|
|
|
|
|
|
|
| |
incorrectly generated. The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)."
Patch by David Chisnall!
llvm-svn: 52680
|
|
|
|
|
|
|
|
| |
also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet."
Patch by David Chisnall!
llvm-svn: 52599
|
|
|
|
|
|
| |
by David Chisnall.
llvm-svn: 52597
|
|
|
|
| |
llvm-svn: 52507
|
|
|
|
|
|
| |
Patch by David Chisnall!
llvm-svn: 52422
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang as a Release build.
The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.
For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.
A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).
This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.
llvm-svn: 52378
|
|
|
|
|
|
| |
This fixes use of alloca on 64-bit systems.
llvm-svn: 52334
|
|
|
|
|
|
|
|
|
|
| |
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.
Patch by Cédric Venet.
llvm-svn: 52264
|
|
|
|
| |
llvm-svn: 52162
|
|
|
|
|
|
|
|
|
| |
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.
llvm-svn: 52160
|
|
|
|
| |
llvm-svn: 52140
|
|
|
|
| |
llvm-svn: 52092
|
|
|
|
| |
llvm-svn: 52089
|
|
|
|
|
|
|
| |
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.
llvm-svn: 52084
|
|
|
|
|
|
|
|
|
|
| |
reported on cfe-dev by Cédric Venet.
Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.
llvm-svn: 52076
|
|
|
|
| |
llvm-svn: 52070
|
|
|
|
|
|
| |
PR2419.
llvm-svn: 52060
|
|
|
|
| |
llvm-svn: 52049
|
|
|
|
| |
llvm-svn: 51993
|
|
|
|
|
|
|
| |
because trying to access non-existent ParamVarDecls can crash.
Testcase from the original source for PR2414.
llvm-svn: 51960
|
|
|
|
| |
llvm-svn: 51958
|
|
|
|
|
|
| |
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080602/063306.html).
llvm-svn: 51944
|
|
|
|
| |
llvm-svn: 51847
|
|
|
|
|
|
| |
Patch by David Chisnall.
llvm-svn: 51840
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 51838
|
|
|
|
| |
llvm-svn: 51837
|
|
|
|
| |
llvm-svn: 51836
|
|
|
|
|
|
| |
Implemented by David Chisnall!
llvm-svn: 51835
|
|
|
|
| |
llvm-svn: 51826
|
|
|
|
|
|
| |
types so that they end up the correct size.
llvm-svn: 51787
|
|
|
|
|
|
|
|
|
|
|
|
| |
this does is reconstruct the type for structs and arrays if the type
wouldn't be compatible otherwise.
The assertion about packing in the struct type reconstruction code
sucks, but I don't see any obvious way to fix it. Maybe we need a general
utility method to take a list of types and alignments and try to construct an
unpacked type if possible?
llvm-svn: 51785
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
of elements.
llvm-svn: 51769
|
|
|
|
|
|
| |
This fixes a crash on the included testcase (found in NetHack).
llvm-svn: 51767
|