diff options
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index c243590955..d90ebb4b36 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -69,11 +69,13 @@ class CodeGenModule { llvm::Function *MemMoveFn; llvm::Function *MemSetFn; - /// GlobalDeclMap - Mapping of decls to global variables we have + /// GlobalDeclMap - Mapping of decl names global variables we have /// already emitted. Note that the entries in this map are the - /// actual global and therefore may not be of the same type as the - /// decl, they should be bitcasted on retrieval. - llvm::DenseMap<const Decl*, llvm::GlobalValue*> GlobalDeclMap; + /// actual globals and therefore may not be of the same type as the + /// decl, they should be bitcasted on retrieval. Also note that the + /// globals are keyed on their source name, not the global name + /// (which may change with attributes such as asm-labels). + llvm::StringMap<llvm::GlobalValue*> GlobalDeclMap; /// List of static global for which code generation is delayed. When /// the translation unit has been fully processed we will lazily @@ -172,11 +174,6 @@ public: VisibilityAttr::VisibilityTypes); private: - /// ReplaceMapValuesWith - This is a really slow and bad function that - /// searches for any entries in GlobalDeclMap that point to OldVal, changing - /// them to point to NewVal. This is badbadbad, FIXME! - void ReplaceMapValuesWith(llvm::GlobalValue *OldVal, llvm::GlobalValue *NewVal); - void SetFunctionAttributes(const FunctionDecl *FD, llvm::Function *F, const llvm::FunctionType *FTy); |