[llvm-commits] [llvm] r74315 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp
Owen Anderson
resistor at mac.com
Fri Jun 26 12:48:37 PDT 2009
Author: resistor
Date: Fri Jun 26 14:48:37 2009
New Revision: 74315
URL: http://llvm.org/viewvc/llvm-project?rev=74315&view=rev
Log:
Privatize some variables.
Modified:
llvm/trunk/lib/Target/CBackend/CBackend.cpp
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=74315&r1=74314&r2=74315&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Fri Jun 26 14:48:37 2009
@@ -100,12 +100,13 @@
std::set<Function*> intrinsicPrototypesAlreadyGenerated;
std::set<const Argument*> ByValParams;
unsigned FPCounter;
+ unsigned OpaqueCounter;
public:
static char ID;
explicit CWriter(raw_ostream &o)
: FunctionPass(&ID), Out(o), IL(0), Mang(0), LI(0),
- TheModule(0), TAsm(0), TD(0) {
+ TheModule(0), TAsm(0), TD(0), OpaqueCounter(0) {
FPCounter = 0;
}
@@ -645,8 +646,7 @@
}
case Type::OpaqueTyID: {
- static int Count = 0;
- std::string TyName = "struct opaque_" + itostr(Count++);
+ std::string TyName = "struct opaque_" + itostr(OpaqueCounter++);
assert(TypeNames.find(Ty) == TypeNames.end());
TypeNames[Ty] = TyName;
return Out << TyName << ' ' << NameSoFar;
@@ -750,8 +750,7 @@
}
case Type::OpaqueTyID: {
- static int Count = 0;
- std::string TyName = "struct opaque_" + itostr(Count++);
+ std::string TyName = "struct opaque_" + itostr(OpaqueCounter++);
assert(TypeNames.find(Ty) == TypeNames.end());
TypeNames[Ty] = TyName;
return Out << TyName << ' ' << NameSoFar;
More information about the llvm-commits
mailing list