]> granicus.if.org Git - clang/commitdiff
Move GlobalDecl to AST
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 14 Jun 2011 04:02:39 +0000 (04:02 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 14 Jun 2011 04:02:39 +0000 (04:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132973 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/GlobalDecl.h [moved from lib/CodeGen/GlobalDecl.h with 83% similarity]
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CGVTables.h
lib/CodeGen/CodeGenModule.h
lib/CodeGen/CodeGenTypes.h

similarity index 83%
rename from lib/CodeGen/GlobalDecl.h
rename to include/clang/AST/GlobalDecl.h
index c2f36d210bfcb68513882651185c3d45953bf437..c43e44c26f3155a2b1c5d68b5a5b117b2ceb7608 100644 (file)
@@ -12,8 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef CLANG_CODEGEN_GLOBALDECL_H
-#define CLANG_CODEGEN_GLOBALDECL_H
+#ifndef LLVM_CLANG_AST_GLOBALDECL_H
+#define LLVM_CLANG_AST_GLOBALDECL_H
 
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
@@ -21,8 +21,6 @@
 
 namespace clang {
 
-namespace CodeGen {
-
 /// GlobalDecl - represents a global declaration. This can either be a
 /// CXXConstructorDecl and the constructor type (Base, Complete).
 /// a CXXDestructorDecl and the destructor type (Base, Complete) or
@@ -89,28 +87,27 @@ public:
   }
 };
 
-} // end namespace CodeGen
 } // end namespace clang
 
 namespace llvm {
   template<class> struct DenseMapInfo;
 
-  template<> struct DenseMapInfo<clang::CodeGen::GlobalDecl> {
-    static inline clang::CodeGen::GlobalDecl getEmptyKey() {
-      return clang::CodeGen::GlobalDecl();
+  template<> struct DenseMapInfo<clang::GlobalDecl> {
+    static inline clang::GlobalDecl getEmptyKey() {
+      return clang::GlobalDecl();
     }
   
-    static inline clang::CodeGen::GlobalDecl getTombstoneKey() {
-      return clang::CodeGen::GlobalDecl::
+    static inline clang::GlobalDecl getTombstoneKey() {
+      return clang::GlobalDecl::
         getFromOpaquePtr(reinterpret_cast<void*>(-1));
     }
 
-    static unsigned getHashValue(clang::CodeGen::GlobalDecl GD) {
+    static unsigned getHashValue(clang::GlobalDecl GD) {
       return DenseMapInfo<void*>::getHashValue(GD.getAsOpaquePtr());
     }
     
-    static bool isEqual(clang::CodeGen::GlobalDecl LHS, 
-                        clang::CodeGen::GlobalDecl RHS) {
+    static bool isEqual(clang::GlobalDecl LHS, 
+                        clang::GlobalDecl RHS) {
       return LHS == RHS;
     }
       
@@ -119,7 +116,7 @@ namespace llvm {
   // GlobalDecl isn't *technically* a POD type. However, its copy constructor,
   // copy assignment operator, and destructor are all trivial.
   template <>
-  struct isPodLike<clang::CodeGen::GlobalDecl> {
+  struct isPodLike<clang::GlobalDecl> {
     static const bool value = true;
   };
 } // end namespace llvm
index 6ec6b65f5e01c63e12a1ba4644fdfbbeb10e20d0..eb1b22d9027031a24ed939071a30106de7b59128 100644 (file)
@@ -33,11 +33,11 @@ namespace clang {
   class VarDecl;
   class ObjCInterfaceDecl;
   class ClassTemplateSpecializationDecl;
+  class GlobalDecl;
 
 namespace CodeGen {
   class CodeGenModule;
   class CodeGenFunction;
-  class GlobalDecl;
   class CGBlockInfo;
 
 /// CGDebugInfo - This class gathers all debug information during compilation
index e830e9a6fbcb30457744edba2b864b586b143ab2..eff6e56c1f80598f75d608d39c6b464b856fa0ff 100644 (file)
@@ -18,7 +18,7 @@
 #include "llvm/GlobalVariable.h"
 #include "clang/Basic/ABI.h"
 #include "clang/AST/CharUnits.h"
-#include "GlobalDecl.h"
+#include "clang/AST/GlobalDecl.h"
 
 namespace clang {
   class CXXRecordDecl;
index 779a3523b7f6126de1a18703e27037c51388a39d..09741dfada4aaa416ae8b260325bad02d7879808 100644 (file)
 #include "clang/AST/Attr.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
+#include "clang/AST/GlobalDecl.h"
 #include "clang/AST/Mangle.h"
 #include "CGVTables.h"
 #include "CodeGenTypes.h"
-#include "GlobalDecl.h"
 #include "llvm/Module.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/StringMap.h"
index ff1eb4c45b598fb113e9d46315a9fb9a1c9b566f..b4a9aea21f8b3efd3ba9417057305baaf0b2bef1 100644 (file)
@@ -15,7 +15,7 @@
 #define CLANG_CODEGEN_CODEGENTYPES_H
 
 #include "CGCall.h"
-#include "GlobalDecl.h"
+#include "clang/AST/GlobalDecl.h"
 #include "llvm/Module.h"
 #include "llvm/ADT/DenseMap.h"
 #include <vector>