summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-03-28 20:36:28 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-03-28 20:36:28 +0000
commita023f79db19dae6c42ce4240e85630510c20ac91 (patch)
tree7f560eefe0cb296bd4d1313b0e77c054be60dca5 /llvm/include
parentcc8ee8e3a226e160965dd586d22059bc3134337f (diff)
downloadbcm5719-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.h4
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
OpenPOWER on IntegriCloud