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 | da80af3681feb019e8362f1e21012156dccdd874 (patch) | |
tree | 8ad6f30ea1818b2ecf9d9cfe4d553cf175dfbcfd /clang/lib/CodeGen/CodeGenModule.h | |
parent | a45a70cf735cc0639d8ea3063db92645a782c959 (diff) | |
download | llvm-da80af3681feb019e8362f1e21012156dccdd874.zip llvm-da80af3681feb019e8362f1e21012156dccdd874.tar.gz llvm-da80af3681feb019e8362f1e21012156dccdd874.tar.bz2 |
Add a new function, to be used by CGRTTI, CGVTables and CGVTT (which each has their own copy of this code).
llvm-svn: 124537
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index bb32fff..9ac692b 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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 |