summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-06-18 00:31:04 +0000
committerTed Kremenek <kremenek@apple.com>2010-06-18 00:31:04 +0000
commit520f47b66f66f3759946ee6db92ffb969e439376 (patch)
tree252d709423b8f6ec8e5296a53d6d2000c6a8c8a9 /clang/lib/AST/ASTContext.cpp
parent0883789ec4a1689b272fec5ab6c6a73ec1fc6dc6 (diff)
downloadbcm5719-llvm-520f47b66f66f3759946ee6db92ffb969e439376.tar.gz
bcm5719-llvm-520f47b66f66f3759946ee6db92ffb969e439376.zip
Change two static variables into instance variables of ASTContext. This allows us to have multiple copies
of ASTContext at the same time. llvm-svn: 106258
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 2db5c5e914a..bb62e9efd58 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -142,7 +142,8 @@ ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM,
BuiltinInfo(builtins),
DeclarationNames(*this),
ExternalSource(0), PrintingPolicy(LOpts),
- LastSDM(0, 0) {
+ LastSDM(0, 0),
+ UniqueBlockByRefTypeID(0), UniqueBlockParmTypeID(0) {
ObjCIdRedefinitionType = QualType();
ObjCClassRedefinitionType = QualType();
ObjCSelRedefinitionType = QualType();
@@ -3154,7 +3155,6 @@ QualType ASTContext::BuildByRefType(const char *DeclName, QualType Ty) {
bool HasCopyAndDispose = BlockRequiresCopying(Ty);
// FIXME: Move up
- static unsigned int UniqueBlockByRefTypeID = 0;
llvm::SmallString<36> Name;
llvm::raw_svector_ostream(Name) << "__Block_byref_" <<
++UniqueBlockByRefTypeID << '_' << DeclName;
@@ -3206,7 +3206,6 @@ QualType ASTContext::getBlockParmType(
llvm::SmallVectorImpl<const Expr *> &Layout) {
// FIXME: Move up
- static unsigned int UniqueBlockParmTypeID = 0;
llvm::SmallString<36> Name;
llvm::raw_svector_ostream(Name) << "__block_literal_"
<< ++UniqueBlockParmTypeID;
OpenPOWER on IntegriCloud