summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-11 22:18:44 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-11 22:18:44 +0000
commit343da2e255623080f61f93c3363a9a028bb62119 (patch)
tree19278092f7ebb0a7c0a7e17bfd376a10ad42e5bf /include
parent118de30ec19ffd47c252f85eadc7c56435284dff (diff)
downloadllvm-343da2e255623080f61f93c3363a9a028bb62119.tar.gz
llvm-343da2e255623080f61f93c3363a9a028bb62119.tar.bz2
llvm-343da2e255623080f61f93c3363a9a028bb62119.tar.xz
On ELF and COFF treat linker_private like private.
The linkers on these systems don't have anything special to do with these symbols. Since the intent is for them to be absent from the final object, just treat them as private. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAsmInfo.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index f09428d28c..5bd42e90f5 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -124,10 +124,12 @@ namespace llvm {
/// file.
const char *PrivateGlobalPrefix; // Defaults to "L"
- /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
- /// be passed through the assembler but be removed by the linker. This
- /// is "l" on Darwin, currently used for some ObjC metadata.
- const char *LinkerPrivateGlobalPrefix; // Defaults to ""
+ /// This prefix is used for symbols that should be passed through the
+ /// assembler but be removed by the linker. This is 'l' on Darwin,
+ /// currently used for some ObjC metadata.
+ /// The default of "" meast that for this system a plain private symbol
+ /// should be used.
+ const char *LinkerPrivateGlobalPrefix; // Defaults to "".
/// InlineAsmStart/End - If these are nonempty, they contain a directive to
/// emit before and after an inline assembly statement.
@@ -441,8 +443,13 @@ namespace llvm {
const char *getPrivateGlobalPrefix() const {
return PrivateGlobalPrefix;
}
+ bool hasLinkerPrivateGlobalPrefix() const {
+ return LinkerPrivateGlobalPrefix[0] != '\0';
+ }
const char *getLinkerPrivateGlobalPrefix() const {
- return LinkerPrivateGlobalPrefix;
+ if (hasLinkerPrivateGlobalPrefix())
+ return LinkerPrivateGlobalPrefix;
+ return getPrivateGlobalPrefix();
}
const char *getInlineAsmStart() const {
return InlineAsmStart;