Move getAccessedFieldNo out of lib/AST/Expr.cpp into

lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.

llvm-svn: 51398
This commit is contained in:
Dan Gohman
2008-05-22 00:50:06 +00:00
parent da8fb59148
commit 75d69da5ab
9 changed files with 62 additions and 30 deletions

View File

@@ -16,6 +16,7 @@
#include "CodeGenTypes.h"
#include "CGObjCRuntime.h"
#include "clang/AST/Attr.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
@@ -130,6 +131,11 @@ public:
/// specified decl yet.
void WarnUnsupported(const Decl *D, const char *Type);
/// setVisibility - Set the visibility for the given LLVM GlobalValue
/// according to the given clang AST visibility value.
static void setVisibility(llvm::GlobalValue *GV,
VisibilityAttr::VisibilityTypes);
private:
/// ReplaceMapValuesWith - This is a really slow and bad function that
/// searches for any entries in GlobalDeclMap that point to OldVal, changing