simplify and cleanup global variable creation stuff to all go through one
code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 12da8c1..60031ab 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -175,8 +175,11 @@
const llvm::TargetData &getTargetData() const { return TheTargetData; }
/// GetAddrOfGlobalVar - Return the llvm::Constant for the address of the
- /// given global variable.
- llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D);
+ /// 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
+ /// normal requested type would be.
+ llvm::Constant *GetAddrOfGlobalVar(const VarDecl *D,
+ const llvm::Type *Ty = 0);
/// GetAddrOfFunction - Return the address of the given function. If Ty is
/// non-null, then this function will use the specified type if it has to