diff options
author | Tim Northover <tnorthover@apple.com> | 2019-06-05 20:37:47 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2019-06-05 20:37:47 +0000 |
commit | 607c8a9d1481312acb421425ac8c8df56a0c9012 (patch) | |
tree | 9c7c049d9488b8242df980d6f4d3a9c892658d62 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 4fb580c31475aa5cf1481927ed6cfefa7a14d5aa (diff) | |
download | bcm5719-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/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 143570fb20a..f59c906c7b7 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -951,7 +951,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) { // Adding function arguments to the value table. for (const auto &I : F.args()) { EnumerateValue(&I); - if (I.hasAttribute(Attribute::ByVal) && I.getParamByValType()) + if (I.hasAttribute(Attribute::ByVal)) EnumerateType(I.getParamByValType()); } FirstFuncConstantID = Values.size(); |