diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-03-28 20:36:28 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-03-28 20:36:28 +0000 |
commit | a023f79db19dae6c42ce4240e85630510c20ac91 (patch) | |
tree | 7f560eefe0cb296bd4d1313b0e77c054be60dca5 /llvm/include | |
parent | cc8ee8e3a226e160965dd586d22059bc3134337f (diff) | |
download | bcm5719-llvm-a023f79db19dae6c42ce4240e85630510c20ac91.tar.gz bcm5719-llvm-a023f79db19dae6c42ce4240e85630510c20ac91.zip |
Handle section vs global name conflict.
This is a fix for PR26941.
When there is both a section and a global definition with the same
name, the global wins.
Section symbols are not added to the symbol table; section references
are left undefined and fixed up in the object writer unless they've
been satisfied by some other definition.
llvm-svn: 264649
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/MC/MCContext.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h index a787664de2f..44d195c1072 100644 --- a/llvm/include/llvm/MC/MCContext.h +++ b/llvm/include/llvm/MC/MCContext.h @@ -96,7 +96,9 @@ namespace llvm { DenseMap<std::pair<unsigned, unsigned>, MCSymbol *> LocalSymbols; /// Keeps tracks of names that were used both for used declared and - /// artificial symbols. + /// artificial symbols. The value is "true" if the name has been used for a + /// non-section symbol (there can be at most one of those, plus an unlimited + /// number of section symbols with the same name). StringMap<bool, BumpPtrAllocator &> UsedNames; /// The next ID to dole out to an unnamed assembler temporary symbol with |