[PATCH] Introduce SpecialCaseList::isIn overload for GlobalAliases.

Alexey Samsonov samsonov at google.com
Mon Aug 19 01:49:42 PDT 2013


  LGTM with a nit


================
Comment at: lib/Transforms/Utils/SpecialCaseList.cpp:202
@@ +201,3 @@
+    return inSectionCategory("fun", GA.getName(), Category);
+  } else {
+    return inSectionCategory("global", GA.getName(), Category) ||
----------------
use either
  if (isa<FunctionType>(...)) {
    return A;
  } else if (isa<GlobalVariable>(...)) {
    return B;
  }
  llvm_unreachable(...);
or:
  if (isa<FunctionType>(...))
    return A;
  return B;


http://llvm-reviews.chandlerc.com/D1437

BRANCH
  scl-alias

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list