diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-29 20:59:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-29 20:59:35 +0000 |
commit | 537fdceded86b5c4c06eb0ac0ff80189c82d7193 (patch) | |
tree | 18779ab4c66b5c172203f79bc3f41e1296ea0e96 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 46fcf9f0b741b63e77b4aec5069b17ef2bdf4464 (diff) | |
download | bcm5719-llvm-537fdceded86b5c4c06eb0ac0ff80189c82d7193.tar.gz bcm5719-llvm-537fdceded86b5c4c06eb0ac0ff80189c82d7193.zip |
Move GetLLVMVisibility to CodeGenModule.
llvm-svn: 124550
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 8e29869f8f9..7652b88fdc2 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -275,6 +275,16 @@ public: void setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *D, TypeVisibilityKind TVK) const; + static llvm::GlobalValue::VisibilityTypes GetLLVMVisibility(Visibility V) { + switch (V) { + case DefaultVisibility: return llvm::GlobalValue::DefaultVisibility; + case HiddenVisibility: return llvm::GlobalValue::HiddenVisibility; + case ProtectedVisibility: return llvm::GlobalValue::ProtectedVisibility; + } + llvm_unreachable("unknown visibility!"); + return llvm::GlobalValue::DefaultVisibility; + } + llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) { if (isa<CXXConstructorDecl>(GD.getDecl())) return GetAddrOfCXXConstructor(cast<CXXConstructorDecl>(GD.getDecl()), |