[PATCH] Move the calling of emitTargetMD() later.
robert lytton
robert at xmos.com
Thu Jul 3 02:38:56 PDT 2014
Closed by commit rL212262 (authored by rlytton).
REPOSITORY
rL LLVM
http://reviews.llvm.org/D4176
Files:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Index: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp
@@ -3297,11 +3297,9 @@
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);
}
}
@@ -3317,11 +3315,9 @@
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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4176.11048.patch
Type: text/x-patch
Size: 1350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140703/a80fdad6/attachment.bin>
More information about the cfe-commits
mailing list