aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-26 19:48:37 +0000
committerOwen Anderson <resistor@mac.com>2009-06-26 19:48:37 +0000
commitde8a944e1ce9d87714d905fdb0d455623e2e846b (patch)
treebb83b32e92b52443e6c13a309a7fa820a3cd50eb /lib
parent5062b3bdede826c1ebba8f2723092a324be3b24d (diff)
downloadexternal_llvm-de8a944e1ce9d87714d905fdb0d455623e2e846b.zip
external_llvm-de8a944e1ce9d87714d905fdb0d455623e2e846b.tar.gz
external_llvm-de8a944e1ce9d87714d905fdb0d455623e2e846b.tar.bz2
Privatize some variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/CBackend/CBackend.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 9a08cad..294c6d3 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -100,12 +100,13 @@ namespace {
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 @@ raw_ostream &CWriter::printType(raw_ostream &Out, const Type *Ty,
}
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 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
}
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;