diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 09:16:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 09:16:30 +0000 |
commit | 570585c91dee98d7ba8ccf1198c03208ba17966b (patch) | |
tree | 9e3e38b458ce1ab46cdebe1f4103966a73e4f269 /lib/CodeGen/CodeGenModule.h | |
parent | 34809507232bc4c3c4840c7d092c7440219fddaf (diff) |
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 12da8c1e34..60031ab648 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -175,8 +175,11 @@ public: 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 |