Rename embedded bitcode section in MachO

Summary:
Rename the section embeds bitcode from ".llvmbc,.llvmbc" to "__LLVM,__bitcode".
The new name matches MachO section naming convention.

Reviewers: rafael, pcc

Subscribers: davide, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D17388

llvm-svn: 262245
This commit is contained in:
Steven Wu
2016-02-29 19:40:10 +00:00
parent bb5d7d7ed8
commit f2fe0141ca
8 changed files with 34 additions and 13 deletions

View File

@@ -266,10 +266,7 @@ basic_symbol_iterator IRObjectFile::symbol_end_impl() const {
ErrorOr<MemoryBufferRef> IRObjectFile::findBitcodeInObject(const ObjectFile &Obj) {
for (const SectionRef &Sec : Obj.sections()) {
StringRef SecName;
if (std::error_code EC = Sec.getName(SecName))
return EC;
if (SecName == ".llvmbc") {
if (Sec.isBitcode()) {
StringRef SecContents;
if (std::error_code EC = Sec.getContents(SecContents))
return EC;