Skip to content
Snippets Groups Projects
Commit 7dd5aef5 authored by George Burgess IV's avatar George Burgess IV
Browse files

Make __builtin_object_size always answer correctly

__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245323 91177308-0d34-0410-b5e6-96231b3b80d8
parent 63179195
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment