mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
add the most expedient hack to fix PR4619, along with a testcase.
Thanks to Rafael for the great example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e77f79591
commit
10cf6a6a4b
@ -326,6 +326,11 @@ const Section *TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
|
||||
|
||||
// FIXME: Use mangler interface (PR4584).
|
||||
std::string Name = Prefix+GV->getNameStr();
|
||||
|
||||
// Pick up the flags for the uniquing section.
|
||||
// FIXME: HACK.
|
||||
Flags |= getFlagsForNamedSection(Name.c_str());
|
||||
|
||||
return getNamedSection(Name.c_str(), Flags);
|
||||
}
|
||||
}
|
||||
|
8
test/CodeGen/X86/global-sections.ll
Normal file
8
test/CodeGen/X86/global-sections.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; RUN: llvm-as < %s | llc -mtriple=i386-unknown-linux-gnu | FileCheck %s -check-prefix=LINUX
|
||||
|
||||
@G1 = common global i32 0
|
||||
|
||||
; LINUX: .type G1,@object
|
||||
; LINUX: .section .gnu.linkonce.b.G1,"aw",@nobits
|
||||
; LINUX: .comm G1,4,4
|
||||
|
Loading…
Reference in New Issue
Block a user