This fixes a crash that mistaken global ctor/dtor as funciton methods. Differential Revision: https://reviews.llvm.org/D133446