From 4f8d123e3e2c260de3377208106ddba87cee28b4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 22 May 2008 00:50:06 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 8a3069e648..bc216e4f48 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -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 -- cgit v1.2.3