Move private structs into anonymous namespaces.

llvm-svn: 126997
This commit is contained in:
Benjamin Kramer 2011-03-04 13:12:48 +00:00
parent 23485e04be
commit 024e619f2a
2 changed files with 26 additions and 24 deletions

View File

@ -42,25 +42,25 @@ using llvm::APFloat;
/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can
/// evaluate the expression regardless of what the RHS is, but C only allows
/// certain things in certain situations.
struct EvalInfo {
const ASTContext &Ctx;
/// EvalResult - Contains information about the evaluation.
Expr::EvalResult &EvalResult;
llvm::DenseMap<const OpaqueValueExpr*, APValue> OpaqueValues;
const APValue *getOpaqueValue(const OpaqueValueExpr *e) {
llvm::DenseMap<const OpaqueValueExpr*, APValue>::iterator
i = OpaqueValues.find(e);
if (i == OpaqueValues.end()) return 0;
return &i->second;
}
EvalInfo(const ASTContext &ctx, Expr::EvalResult& evalresult)
: Ctx(ctx), EvalResult(evalresult) {}
};
namespace {
struct EvalInfo {
const ASTContext &Ctx;
/// EvalResult - Contains information about the evaluation.
Expr::EvalResult &EvalResult;
typedef llvm::DenseMap<const OpaqueValueExpr*, APValue> MapTy;
MapTy OpaqueValues;
const APValue *getOpaqueValue(const OpaqueValueExpr *e) const {
MapTy::const_iterator i = OpaqueValues.find(e);
if (i == OpaqueValues.end()) return 0;
return &i->second;
}
EvalInfo(const ASTContext &ctx, Expr::EvalResult &evalresult)
: Ctx(ctx), EvalResult(evalresult) {}
};
struct ComplexValue {
private:
bool IsInt;

View File

@ -2854,12 +2854,14 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
}
/// \brief Data used with FindHiddenVirtualMethod
struct FindHiddenVirtualMethodData {
Sema *S;
CXXMethodDecl *Method;
llvm::SmallPtrSet<const CXXMethodDecl *, 8> OverridenAndUsingBaseMethods;
llvm::SmallVector<CXXMethodDecl *, 8> OverloadedMethods;
};
namespace {
struct FindHiddenVirtualMethodData {
Sema *S;
CXXMethodDecl *Method;
llvm::SmallPtrSet<const CXXMethodDecl *, 8> OverridenAndUsingBaseMethods;
llvm::SmallVector<CXXMethodDecl *, 8> OverloadedMethods;
};
}
/// \brief Member lookup function that determines whether a given C++
/// method overloads virtual methods in a base class without overriding any,