<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/clang.git/lib/CodeGen/CGNonTrivialStruct.cpp, branch master</title>
<subtitle>llvm.org: Obsolete (use llvm)
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/'/>
<entry>
<title>Do a sweep of symbol internalization. NFC.</title>
<updated>2019-08-23T19:59:23+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2019-08-23T19:59:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=e63380d34e2564ffc84b2ab936b7e3bd7d0c8923'/>
<id>e63380d34e2564ffc84b2ab936b7e3bd7d0c8923</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369803 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369803 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add { } to silence compiler warning [NFC]</title>
<updated>2019-04-11T06:57:12+00:00</updated>
<author>
<name>Mikael Holmen</name>
<email>mikael.holmen@ericsson.com</email>
</author>
<published>2019-04-11T06:57:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=0bbdb288ca016f409061cb4d453cb8af90e28e07'/>
<id>0bbdb288ca016f409061cb4d453cb8af90e28e07</id>
<content type='text'>
At least clang 3.6 warns on the original code:

../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:829:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  return std::array&lt;Address, 1&gt;({Address(nullptr, CharUnits::Zero())});
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 {                                  }
../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:833:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  return std::array&lt;Address, 2&gt;({Address(nullptr, CharUnits::Zero()),
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358152 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least clang 3.6 warns on the original code:

../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:829:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  return std::array&lt;Address, 1&gt;({Address(nullptr, CharUnits::Zero())});
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 {                                  }
../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:833:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
  return std::array&lt;Address, 2&gt;({Address(nullptr, CharUnits::Zero()),
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358152 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs.</title>
<updated>2019-04-10T19:57:20+00:00</updated>
<author>
<name>John McCall</name>
<email>rjmccall@apple.com</email>
</author>
<published>2019-04-10T19:57:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=7fd06d80f0b2099b1ae792b5339a0428ae80797b'/>
<id>7fd06d80f0b2099b1ae792b5339a0428ae80797b</id>
<content type='text'>
Patch by Tony Allevato!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358132 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Tony Allevato!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358132 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][ObjC] Adjust the addresses passed to calls to synthesized</title>
<updated>2019-03-29T00:23:20+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-03-29T00:23:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=316b9626930c0b397ffe3c053cdd336ca51b4d04'/>
<id>316b9626930c0b397ffe3c053cdd336ca51b4d04</id>
<content type='text'>
copy/move constructor/assignment operator functions for non-trivial C
structs.

This commit fixes a bug where the offset of struct fields weren't being
taken into account when computing the addresses passed to calls to the
special functions.

For example, the copy constructor for S1 (__copy_constructor_8_8_s0_s8)
would pass the start addresses of the destination and source structs to
the call to S0's copy constructor (_copy_constructor_8_8_s0) without
adding the offset of field f1 to the addresses.

typedef struct {
  id f0;
  S0 f1;
} S1;

void test(S1 s1) {
  S1 t = s1;
}

rdar://problem/49400610

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357229 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
copy/move constructor/assignment operator functions for non-trivial C
structs.

This commit fixes a bug where the offset of struct fields weren't being
taken into account when computing the addresses passed to calls to the
special functions.

For example, the copy constructor for S1 (__copy_constructor_8_8_s0_s8)
would pass the start addresses of the destination and source structs to
the call to S0's copy constructor (_copy_constructor_8_8_s0) without
adding the offset of field f1 to the addresses.

typedef struct {
  id f0;
  S0 f1;
} S1;

void test(S1 s1) {
  S1 t = s1;
}

rdar://problem/49400610

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357229 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos and formatting. NFC.</title>
<updated>2019-03-29T00:23:17+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-03-29T00:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=d3a5343d6a6be0c1be10943070e3eb888b271024'/>
<id>d3a5343d6a6be0c1be10943070e3eb888b271024</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357228 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357228 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Add additional mangling for struct members of non trivial structs</title>
<updated>2019-03-28T17:01:20+00:00</updated>
<author>
<name>Shoaib Meenai</name>
<email>smeenai@fb.com</email>
</author>
<published>2019-03-28T17:01:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=5e12e9d63e3f8ec6de50843cc378f9a08c3013df'/>
<id>5e12e9d63e3f8ec6de50843cc378f9a08c3013df</id>
<content type='text'>
In https://bugs.llvm.org/show_bug.cgi?id=41206 we observe bad codegen
when embedding a non-trivial C struct within a C struct. This is due to
the fact that name mangling for non-trivial structs marks the two
structs as identical. This diff contains a fix for this issue.

Patch by Dan Zimmerman &lt;daniel.zimmerman@me.com&gt;.

Differential Revision: https://reviews.llvm.org/D59873

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357184 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://bugs.llvm.org/show_bug.cgi?id=41206 we observe bad codegen
when embedding a non-trivial C struct within a C struct. This is due to
the fact that name mangling for non-trivial structs marks the two
structs as identical. This diff contains a fix for this issue.

Patch by Dan Zimmerman &lt;daniel.zimmerman@me.com&gt;.

Differential Revision: https://reviews.llvm.org/D59873

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357184 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[opaque pointer types] Cleanup CGBuilder's Create*GEP.</title>
<updated>2019-02-09T22:22:28+00:00</updated>
<author>
<name>James Y Knight</name>
<email>jyknight@google.com</email>
</author>
<published>2019-02-09T22:22:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=937984b3a98c5c2a3eef78d0b1d6573287ae97a6'/>
<id>937984b3a98c5c2a3eef78d0b1d6573287ae97a6</id>
<content type='text'>
The various EltSize, Offset, DataLayout, and StructLayout arguments
are all computable from the Address's element type and the DataLayout
which the CGBuilder already has access to.

After having previously asserted that the computed values are the same
as those passed in, now remove the redundant arguments from
CGBuilder's Create*GEP functions.

Differential Revision: https://reviews.llvm.org/D57767

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353629 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The various EltSize, Offset, DataLayout, and StructLayout arguments
are all computable from the Address's element type and the DataLayout
which the CGBuilder already has access to.

After having previously asserted that the computed values are the same
as those passed in, now remove the redundant arguments from
CGBuilder's Create*GEP functions.

Differential Revision: https://reviews.llvm.org/D57767

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353629 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the file headers across all of the LLVM projects in the monorepo</title>
<updated>2019-01-19T08:50:56+00:00</updated>
<author>
<name>Chandler Carruth</name>
<email>chandlerc@gmail.com</email>
</author>
<published>2019-01-19T08:50:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=324f918438715b4a0d024af5930628c1674f4fcd'/>
<id>324f918438715b4a0d024af5930628c1674f4fcd</id>
<content type='text'>
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Move storage of dispatch-version to GlobalDecl</title>
<updated>2018-11-13T15:48:08+00:00</updated>
<author>
<name>Erich Keane</name>
<email>erich.keane@intel.com</email>
</author>
<published>2018-11-13T15:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=43f8ad7966404a3caab540f2ef8b79a69628b6bb'/>
<id>43f8ad7966404a3caab540f2ef8b79a69628b6bb</id>
<content type='text'>
As suggested by Richard Smith, and initially put up for review here:
https://reviews.llvm.org/D53341, this patch removes a hack that was used
to ensure that proper target-feature lists were used when emitting
cpu-dispatch (and eventually, target-clones) implementations. As a part
of this, the GlobalDecl object is proliferated to a bunch more
locations.

Originally, this was put up for review (see above) to get acceptance on
the approach, though discussion with Richard in San Diego showed he
approved of the approach taken here.  Thus, I believe this is acceptable
for Review-After-commit

Differential Revision: https://reviews.llvm.org/D53341

Change-Id: I0a0bd673340d334d93feac789d653e03d9f6b1d5

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346757 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As suggested by Richard Smith, and initially put up for review here:
https://reviews.llvm.org/D53341, this patch removes a hack that was used
to ensure that proper target-feature lists were used when emitting
cpu-dispatch (and eventually, target-clones) implementations. As a part
of this, the GlobalDecl object is proliferated to a bunch more
locations.

Originally, this was put up for review (see above) to get acceptance on
the approach, though discussion with Richard in San Diego showed he
approved of the approach taken here.  Thus, I believe this is acceptable
for Review-After-commit

Differential Revision: https://reviews.llvm.org/D53341

Change-Id: I0a0bd673340d334d93feac789d653e03d9f6b1d5

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346757 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass the function type instead of the return type to FunctionDecl::Create</title>
<updated>2018-11-11T00:56:15+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2018-11-11T00:56:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=7dec0f05fefde9d87b465d57d739230563b26584'/>
<id>7dec0f05fefde9d87b465d57d739230563b26584</id>
<content type='text'>
Fix places where the return type of a FunctionDecl was being used in
place of the function type

FunctionDecl::Create() takes as its T parameter the type of function
that should be created, not the return type. Passing in the return type
looks to have been copypasta'd around a bit, but the number of correct
usages outweighs the incorrect ones so I've opted for keeping what T is
the same and fixing up the call sites instead.

This fixes a crash in Clang when attempting to compile the following
snippet of code with -fblocks -fsanitize=function -x objective-c++ (my
original repro case):

  void g(void(^)());
  void f()
  {
      __block int a = 0;
        g(^(){ a++; });
  }

as well as the following which only requires -fsanitize=function -x c++:

  void f(char * buf)
  {
      __builtin_os_log_format(buf, "");
  }

Patch by: Ben (bobsayshilol)

Differential revision: https://reviews.llvm.org/D53263

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346601 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix places where the return type of a FunctionDecl was being used in
place of the function type

FunctionDecl::Create() takes as its T parameter the type of function
that should be created, not the return type. Passing in the return type
looks to have been copypasta'd around a bit, but the number of correct
usages outweighs the incorrect ones so I've opted for keeping what T is
the same and fixing up the call sites instead.

This fixes a crash in Clang when attempting to compile the following
snippet of code with -fblocks -fsanitize=function -x objective-c++ (my
original repro case):

  void g(void(^)());
  void f()
  {
      __block int a = 0;
        g(^(){ a++; });
  }

as well as the following which only requires -fsanitize=function -x c++:

  void f(char * buf)
  {
      __builtin_os_log_format(buf, "");
  }

Patch by: Ben (bobsayshilol)

Differential revision: https://reviews.llvm.org/D53263

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346601 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
