[PATCH] D57664: [opaque pointer types] Fix the CallInfo passed to EmitCall in some edge cases.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 4 13:06:32 PST 2019


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Seems reasonable to me - but if you like you can wait for Richard who might have a more nuanced understanding of the code. (but I'm OK signing off on this if you are & Richard can provide any extra feedback post-commit)



================
Comment at: clang/lib/CodeGen/CGCall.cpp:3837
+    // having pointee types).
+    llvm::FunctionType *IRFuncTyFromInfo = getTypes().GetFunctionType(CallInfo);
+    assert(IRFuncTy == IRFuncTyFromInfo);
----------------
This will be warned as unused in a release build.

Would this be hideous if it's just all one big assert?

  assert((CallInfo.isVariadic && CallInfo.getArgStruct) || IRFuncTy == getTypes().GetFunctionType(CallInfo));

(I think that's accurate?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57664/new/

https://reviews.llvm.org/D57664





More information about the cfe-commits mailing list