diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-26 03:39:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-26 03:39:53 +0000 |
commit | a53115b4c254885fa19bbedf96d8d491204b86e8 (patch) | |
tree | ede0e19920f3cfc045eb13bff88d689780ffd92f /lib | |
parent | cb05af852f1d346ac07b84c74a930a5cdbd6d427 (diff) | |
download | external_llvm-a53115b4c254885fa19bbedf96d8d491204b86e8.zip external_llvm-a53115b4c254885fa19bbedf96d8d491204b86e8.tar.gz external_llvm-a53115b4c254885fa19bbedf96d8d491204b86e8.tar.bz2 |
Compile:
int x __attribute__((used));
to:
.data
.comm _x,4 ; 'x'
.no_dead_strip _x
on both x86 and ppc darwin targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 1 | ||||
-rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 201d80c..03e9a01 100644 --- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -32,6 +32,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) { LCOMMDirective = "\t.lcomm\t"; StaticCtorsSection = ".mod_init_func"; StaticDtorsSection = ".mod_term_func"; + UsedDirective = "\t.no_dead_strip\t"; InlineAsmStart = "# InlineAsm Start"; InlineAsmEnd = "# InlineAsm End"; diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 9ca0e15..581feb7 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -44,6 +44,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { InlineAsmStart = "# InlineAsm Start"; InlineAsmEnd = "# InlineAsm End"; SetDirective = "\t.set"; + UsedDirective = "\t.no_dead_strip\t"; NeedsSet = true; DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; |