| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 128057
|
| |
|
|
| |
llvm-svn: 127931
|
| |
|
|
|
|
| |
type.
llvm-svn: 127391
|
| |
|
|
| |
llvm-svn: 127390
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 126730
|
| |
|
|
|
|
| |
in functionality intended.
llvm-svn: 126727
|
| |
|
|
|
|
|
|
| |
they are known to be exact multiples of the width of the char type. Add a
test case to CodeGen/union.c that would have caught the problem with the
previous attempt. No change in functionality intended.
llvm-svn: 126628
|
| |
|
|
|
|
| |
layout", it broke some GCC tests.
llvm-svn: 126386
|
| |
|
|
|
|
|
| |
methods, when they are known to be exact multiples of the width of the char
type.
llvm-svn: 126357
|
| |
|
|
| |
llvm-svn: 126356
|
| |
|
|
|
|
|
|
|
|
|
| |
with getter and setter methods in both bit units and CharUnits. This will help
simplify some of the unit mismatch in the parts of the code where sizes are
known to be exact multiples of the width of the char type.
Assertions in the getters help guard against accidentally converting to
CharUnits when sizes are not exact multiples of the char width.
llvm-svn: 126354
|
| |
|
|
|
|
| |
intended.
llvm-svn: 126066
|
| |
|
|
|
|
| |
intended.
llvm-svn: 126034
|
| |
|
|
|
|
| |
intended.
llvm-svn: 125704
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 125643
|
| |
|
|
|
|
| |
intended.
llvm-svn: 125641
|
| |
|
|
|
|
| |
intended.
llvm-svn: 125639
|
| |
|
|
|
|
| |
intended.
llvm-svn: 125638
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 125549
|
| |
|
|
|
|
|
| |
unnecessary calls to RoundUpToAlignment. No changes to functionality
intended.
llvm-svn: 125356
|
| |
|
|
|
|
|
| |
CharUnits to sizes in bits, and use it to tidy up the places where the
conversion was done explicitly.
llvm-svn: 125332
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 125156
|
| |
|
|
|
|
| |
functionality intended.
llvm-svn: 125069
|
| |
|
|
|
|
|
|
| |
but has non-empty data fields, such as array of zero length,
remains zero.
// rdar://8945175
llvm-svn: 124741
|
| |
|
|
| |
llvm-svn: 124661
|
| |
|
|
| |
llvm-svn: 124646
|
| |
|
|
|
|
| |
ASTContext::toCharUnitsFromBits().
llvm-svn: 124092
|
| |
|
|
|
|
| |
ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units.
llvm-svn: 123715
|
| |
|
|
|
|
|
| |
and mark the fields they use as mutable. This allows us to remove a few
const_casts.
llvm-svn: 123314
|
| |
|
|
|
|
|
|
| |
The problem was that we were asserting the we never added an empty class
to the same offset twice. This is not true for unions, where two members, empty
or not, can have the some offset.
llvm-svn: 122633
|
| |
|
|
| |
llvm-svn: 121352
|
| |
|
|
|
|
|
|
|
|
| |
aligment of the sub-struct,
take into account if the sub-struct is packed and its maximum field alignment.
Fixes rdar://8745206
llvm-svn: 121335
|
| |
|
|
|
|
| |
as well.
llvm-svn: 120137
|
| |
|
|
| |
llvm-svn: 120133
|
| |
|
|
| |
llvm-svn: 120131
|
| |
|
|
|
|
|
|
|
|
|
| |
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
|
| |
|
|
| |
llvm-svn: 117921
|
| |
|
|
| |
llvm-svn: 117883
|
| |
|
|
|
|
| |
getVBaseClassOffset instead.
llvm-svn: 117882
|
| |
|
|
|
|
| |
getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
llvm-svn: 117881
|
| |
|
|
| |
llvm-svn: 117878
|
| |
|
|
| |
llvm-svn: 117877
|
| |
|
|
| |
llvm-svn: 117875
|
| |
|
|
| |
llvm-svn: 117874
|
| |
|
|
| |
llvm-svn: 117873
|
| |
|
|
|
|
| |
ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object.
llvm-svn: 117869
|
| |
|
|
| |
llvm-svn: 117104
|
| |
|
|
|
|
|
|
| |
complete declaration context in order to compute it.
Progress for rdar://7260160.
llvm-svn: 116508
|
| |
|
|
|
|
| |
key functions (same as GCC).
llvm-svn: 116391
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)
-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect
on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.
The warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.
To avoid calculating the layouts of all structs regardless of whether they are needed or not,
I let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings
will be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:
$ cat t.c
struct S {
char c;
int i;
};
void f(struct S* s) {}
$ clang -fsyntax-only -Wpadded t.c
$ clang -c -Wpadded t.c -o t.o
t.c:3:7: warning: padding struct 'struct S' with 3 bytes to align 'i' [-Wpadded]
int i;
^
1 warning generated.
This is a good tradeoff between providing the warnings and not calculating layouts for all
structs in case the user has enabled a couple of rarely used warnings.
llvm-svn: 114544
|