sfantao added a comment.
Committed in r253926!
Thanks,
Samuel
Comment at: lib/CodeGen/CGCall.cpp:1420
@@ +1419,3 @@
+ // If we have information about the function prototype, we can learn
+ // attributes form there.
+ AddAttributesFromFunctionProtoType(getContext(), FuncAttrs
sfantao updated this revision to Diff 40977.
sfantao added a comment.
Fix typo in comment.
http://reviews.llvm.org/D14796
Files:
include/clang/CodeGen/CGFunctionInfo.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprComplex.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGOb
rjmccall added a comment.
Thanks, that's great. One minor tweak, and feel free to just commit when
you've done that.
Comment at: lib/CodeGen/CGCall.cpp:1420
@@ +1419,3 @@
+ // If we have information about the function proto type, we can learn
+ // attributes form there.
+ A
sfantao added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3751
@@ +3750,3 @@
+ // Preserve the non-canonical function type because things like exception
+ // specifications disappear in the canonical type. That information is useful
+ // to drive the generation of more
sfantao updated this revision to Diff 40646.
sfantao added a comment.
Update comment as suggested by John.
http://reviews.llvm.org/D14796
Files:
include/clang/CodeGen/CGFunctionInfo.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprComplex.cpp
lib/CodeGen/CGObjC.cpp
rjmccall added a comment.
That's exactly what I was looking for, thanks.
Comment at: lib/CodeGen/CGExpr.cpp:3751
@@ +3750,3 @@
+ // Preserve the function proto type because it contains useful information
+ // that we may be interested in using later on in the code generation.
sfantao added a comment.
In http://reviews.llvm.org/D14796#292336, @rjmccall wrote:
> What I was thinking was something more along the lines of a little struct
> that stored either a Decl * or a FunctionType *, and you could change the
> TargetDecl argument to functions like EmitCall and Constr
sfantao updated this revision to Diff 40587.
sfantao added a comment.
Create `CGCalleeInfo` to forward the declaration and function type information
during the emission of calls.
http://reviews.llvm.org/D14796
Files:
include/clang/CodeGen/CGFunctionInfo.h
lib/CodeGen/CGCall.cpp
lib/CodeG
rjmccall added a comment.
What I was thinking was something more along the lines of a little struct that
stored either a Decl * or a FunctionType *, and you could change the TargetDecl
argument to functions like EmitCall and ConstructAttributeList to that. Maybe
call it something like CalleeIn