From 3e15bf33e024b9df9e89351a165acfdb1dde51ed Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 2 May 2007 21:39:20 +0000 Subject: Use 'static const char' instead of 'static const int'. Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/IPA/CallGraph.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/Analysis/IPA/CallGraph.cpp') diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index ad6c898540..4309555bf1 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -51,7 +51,7 @@ class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass { CallGraphNode *CallsExternalNode; public: - static const int ID; // Class identification, replacement for typeinfo + static const char ID; // Class identification, replacement for typeinfo BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0), ExternalCallingNode(0), CallsExternalNode(0) {} @@ -190,15 +190,14 @@ private: } }; - RegisterAnalysisGroup X("Call Graph"); RegisterPass Y("basiccg", "Basic CallGraph Construction"); RegisterAnalysisGroup Z(Y); } //End anonymous namespace -const int CallGraph::ID = 0; -const int BasicCallGraph::ID = 0; +const char CallGraph::ID = 0; +const char BasicCallGraph::ID = 0; void CallGraph::initialize(Module &M) { Mod = &M; -- cgit v1.2.3-18-g5258