llvm::NamedMDNode *GlobalMetadata = nullptr;
// StaticLocalDeclMap
- for (llvm::DenseMap<GlobalDecl,StringRef>::iterator
- I = MangledDeclNames.begin(), E = MangledDeclNames.end();
- I != E; ++I) {
- llvm::GlobalValue *Addr = getModule().getNamedValue(I->second);
- EmitGlobalDeclMetadata(*this, GlobalMetadata, I->first, Addr);
+ for (auto &I : MangledDeclNames) {
+ llvm::GlobalValue *Addr = getModule().getNamedValue(I.second);
+ EmitGlobalDeclMetadata(*this, GlobalMetadata, I.first, Addr);
}
}
llvm::NamedMDNode *GlobalMetadata = nullptr;
- for (llvm::DenseMap<const Decl*, llvm::Value*>::iterator
- I = LocalDeclMap.begin(), E = LocalDeclMap.end(); I != E; ++I) {
- const Decl *D = I->first;
- llvm::Value *Addr = I->second;
-
+ for (auto &I : LocalDeclMap) {
+ const Decl *D = I.first;
+ llvm::Value *Addr = I.second;
if (auto *Alloca = dyn_cast<llvm::AllocaInst>(Addr)) {
llvm::Value *DAddr = GetPointerConstant(getLLVMContext(), D);
Alloca->setMetadata(DeclPtrKind, llvm::MDNode::get(Context, DAddr));