llvm.org GIT mirror llvm / 3c1ea17
Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to overwrite the same symbol in profile run-time to distinguish IR profiles from Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the lack of COMDAT support." This reverts commits r268969, r268979 and r268984. They had target specific test in generic directories without the correct specifiers and made it hard for us to come up with a good solution by rapidly committing untested changes. This test needs to be in a target specific directory or have the correct REQUIRED identifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269027 91177308-0d34-0410-b5e6-96231b3b80d8 Renato Golin 3 years ago
2 changed file(s) with 1 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
774774 IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility);
775775 Triple TT(M.getTargetTriple());
776776 if (TT.isOSBinFormatMachO())
777 IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceAnyLinkage);
777 IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceODRLinkage);
778778 else
779779 IRLevelVersionVariable->setComdat(M.getOrInsertComdat(
test/Transforms/PGOProfile/macho.ll less more
None ; RUN: opt < %s -pgo-instr-gen -instrprof -S | llc | FileCheck %s --check-prefix=MACHO-DIRECTIVE
2 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-apple-macosx10.11.0"
5 ; MACHO-DIRECTIVE: .weak_definition ___llvm_profile_raw_version
6 define i32 @test_macho(i32 %i) {
7 entry:
8 ret i32 %i
9 }