forked from OSchip/llvm-project
Reapply "IR: Make getRetAlign check callee function attributes"
Reapply3d2d208f6a
, reverted ina97e20a3a8
This commit is contained in:
parent
5e5efd8a91
commit
7a5b0a2934
|
@ -1723,7 +1723,13 @@ public:
|
|||
}
|
||||
|
||||
/// Extract the alignment of the return value.
|
||||
MaybeAlign getRetAlign() const { return Attrs.getRetAlignment(); }
|
||||
MaybeAlign getRetAlign() const {
|
||||
if (auto Align = Attrs.getRetAlignment())
|
||||
return Align;
|
||||
if (const Function *F = getCalledFunction())
|
||||
return F->getAttributes().getRetAlignment();
|
||||
return None;
|
||||
}
|
||||
|
||||
/// Extract the alignment for a call or parameter (0=unknown).
|
||||
MaybeAlign getParamAlign(unsigned ArgNo) const {
|
||||
|
|
Loading…
Reference in New Issue