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 | 149927c9f86ed36995fc5956432074fefd1cca9c (patch) | |
tree | 5be44aa5142e4c5dd895a11e7e8d46ccac108d0c /clang/lib/CodeGen/CodeGenModule.h | |
parent | 832323ea4100f694e3d7f3c0b317e9a5c129e7c9 (diff) | |
download | bcm5719-llvm-149927c9f86ed36995fc5956432074fefd1cca9c.tar.gz bcm5719-llvm-149927c9f86ed36995fc5956432074fefd1cca9c.zip |
simplify and cleanup global variable creation stuff to all go through one
code path.
llvm-svn: 67445
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 12da8c1e343..60031ab648a 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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 |