From 35c161cbe6395f6d867a5d707b93e021e357e1e9 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 30 Jun 2009 05:33:46 +0000 Subject: Fix the build on Cygwin. Patch by Aaron Gray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74510 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/IPA/Andersens.cpp | 4 ++-- lib/Support/Annotation.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 4ace049..3fb6526 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -211,7 +211,7 @@ namespace { // for each location equivalent Node. struct Node { private: - static unsigned Counter; + static volatile sys::cas_flag Counter; public: Value *Val; @@ -618,7 +618,7 @@ X("anders-aa", "Andersen's Interprocedural Alias Analysis", false, true); static RegisterAnalysisGroup Y(X); // Initialize Timestamp Counter (static). -unsigned Andersens::Node::Counter = 0; +volatile llvm::sys::cas_flag Andersens::Node::Counter = 0; ModulePass *llvm::createAndersensPass() { return new Andersens(); } diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp index b778043..4b5b97e 100644 --- a/lib/Support/Annotation.cpp +++ b/lib/Support/Annotation.cpp @@ -39,7 +39,7 @@ namespace { } typedef std::map IDMapType; -static unsigned IDCounter = 0; // Unique ID counter +static volatile sys::cas_flag IDCounter = 0; // Unique ID counter // Static member to ensure initialiation on demand. static ManagedStatic IDMap; -- cgit v1.1