moved CFGBuilder into an anonymous namespace

llvm-svn: 41334
This commit is contained in:
Ted Kremenek 2007-08-23 21:26:19 +00:00
parent 4e1f80d255
commit 04cca64f8c
1 changed files with 11 additions and 12 deletions

View File

@ -23,17 +23,16 @@ using namespace clang;
namespace { namespace {
// SaveAndRestore - A utility class that uses RIIA to save and restore // SaveAndRestore - A utility class that uses RIIA to save and restore
// the value of a variable. // the value of a variable.
template<typename T> template<typename T>
struct SaveAndRestore { struct SaveAndRestore {
SaveAndRestore(T& x) : X(x), old_value(x) {} SaveAndRestore(T& x) : X(x), old_value(x) {}
~SaveAndRestore() { X = old_value; } ~SaveAndRestore() { X = old_value; }
T& X; T& X;
T old_value; T old_value;
}; };
}
/// CFGBuilder - This class is implements CFG construction from an AST. /// CFGBuilder - This class is implements CFG construction from an AST.
/// The builder is stateful: an instance of the builder should be used to only /// The builder is stateful: an instance of the builder should be used to only
@ -607,7 +606,7 @@ public:
} }
}; };
} // end anonymous namespace
/// createBlock - Constructs and adds a new CFGBlock to the CFG. The /// createBlock - Constructs and adds a new CFGBlock to the CFG. The
/// block has no successors or predecessors. If this is the first block /// block has no successors or predecessors. If this is the first block