[llvm] c79a449 - OpaquePtr: Record byref types in bitcode writer

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 10:14:26 PST 2021


Author: Matt Arsenault
Date: 2021-03-07T13:14:17-05:00
New Revision: c79a4490d443b4c4e194f380315c889f53635a87

URL: https://github.com/llvm/llvm-project/commit/c79a4490d443b4c4e194f380315c889f53635a87
DIFF: https://github.com/llvm/llvm-project/commit/c79a4490d443b4c4e194f380315c889f53635a87.diff

LOG: OpaquePtr: Record byref types in bitcode writer

I missed this case when adding byref. I believe this is NFC until
pointee types are really removed.

Added: 
    

Modified: 
    llvm/lib/Bitcode/Writer/ValueEnumerator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index 06f19604fd43..8fe4b8c3e736 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -1005,6 +1005,8 @@ void ValueEnumerator::incorporateFunction(const Function &F) {
       EnumerateType(I.getParamByValType());
     else if (I.hasAttribute(Attribute::StructRet))
       EnumerateType(I.getParamStructRetType());
+    else if (I.hasAttribute(Attribute::ByRef))
+      EnumerateType(I.getParamByRefType());
   }
   FirstFuncConstantID = Values.size();
 


        


More information about the llvm-commits mailing list