diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-29 18:20:20 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-29 18:20:20 +0000 |
commit | 3bd6202ea2d5b5f7c8229cd280a846ae3dcf2355 (patch) | |
tree | 2360d8b30576e6e6eec8a95d091dcc876403fd2b /lib/CodeGen/CodeGenModule.h | |
parent | 3b8037a8c6f462e51f75c82b3d7fe1b8dbcf06c0 (diff) |
Add a new function, to be used by CGRTTI, CGVTables and CGVTT (which each has their own copy of this code).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index bb32fff826..9ac692b263 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -280,6 +280,14 @@ public: return GetAddrOfGlobalVar(cast<VarDecl>(GD.getDecl())); } + /// CreateOrReplaceCXXRuntimeVariable - Will return a global variable of the given + /// type. If a variable with a different type already exists then a new + /// variable with the right type will be created and all uses of the old + /// variable will be replaced with a bitcast to the new variable. + llvm::GlobalVariable * + CreateOrReplaceCXXRuntimeVariable(llvm::StringRef Name, const llvm::Type *Ty, + llvm::GlobalValue::LinkageTypes Linkage); + /// GetAddrOfGlobalVar - Return the llvm::Constant for the address of the /// given global variable. If Ty is non-null and if the global doesn't exist, /// then it will be greated with the specified type instead of whatever the |