summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2019-06-05 20:37:47 +0000
committerTim Northover <tnorthover@apple.com>2019-06-05 20:37:47 +0000
commit607c8a9d1481312acb421425ac8c8df56a0c9012 (patch)
tree9c7c049d9488b8242df980d6f4d3a9c892658d62 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent4fb580c31475aa5cf1481927ed6cfefa7a14d5aa (diff)
downloadbcm5719-llvm-607c8a9d1481312acb421425ac8c8df56a0c9012.tar.gz
bcm5719-llvm-607c8a9d1481312acb421425ac8c8df56a0c9012.zip
IR: make getParamByValType Just Work. NFC.
Most parts of LLVM don't care whether the byval type is derived from an explicit Attribute or from the parameter's pointee type, so it makes sense for the main access function to just return the right value. The very few users who do care (only BitcodeReader so far) can find out how it's specified by accessing the Attribute directly. llvm-svn: 362642
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 4f7257d4a15..07d6ac83e03 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -9584,8 +9584,7 @@ void SelectionDAGISel::LowerArguments(const Function &F) {
// For ByVal, size and alignment should be passed from FE. BE will
// guess if this info is not there but there are cases it cannot get
// right.
- unsigned FrameSize = DL.getTypeAllocSize(
- Arg.getParamByValType() ? Arg.getParamByValType() : ElementTy);
+ unsigned FrameSize = DL.getTypeAllocSize(Arg.getParamByValType());
Flags.setByValSize(FrameSize);
unsigned FrameAlign;
OpenPOWER on IntegriCloud