aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-01-29 18:20:20 +0000
committerAnders Carlsson <andersca@mac.com>2011-01-29 18:20:20 +0000
commitda80af3681feb019e8362f1e21012156dccdd874 (patch)
tree8ad6f30ea1818b2ecf9d9cfe4d553cf175dfbcfd /clang/lib/CodeGen/CodeGenModule.h
parenta45a70cf735cc0639d8ea3063db92645a782c959 (diff)
downloadllvm-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.h8
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