[PATCH] D54498: AbstractCallSite -- A unified interface for (in)direct and callback calls

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 09:37:37 PST 2018


jdoerfert added inline comments.


================
Comment at: lib/IR/AbstractCallSite.cpp:80
+  // A collection of known broker functions.
+  enum KnownBrokerFunctions {
+    KBF_UNKNOWN,
----------------
fhahn wrote:
> Could this be an enum class? I think you could drop the default case in the switch later on, given you handle all cases. The compiler will warn/error on not handled cases.
Sure.


================
Comment at: lib/IR/AbstractCallSite.cpp:95
+  // First check if we did indeed find a known broker function or not.
+  if (BrokerFn == KBF_UNKNOWN) {
+    // If we cannot create a call back for this use we invalidate the abstract
----------------
fhahn wrote:
> Is there a reason this cannot be part of the switch below?
It "simplified" the bookkeeping but nothing serious. I can include it in the switch as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D54498





More information about the llvm-commits mailing list