OSDN Git Service

Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation...
authorRenato Golin <renato.golin@linaro.org>
Tue, 10 May 2016 08:23:57 +0000 (08:23 +0000)
committerRenato Golin <renato.golin@linaro.org>
Tue, 10 May 2016 08:23:57 +0000 (08:23 +0000)
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

lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/Transforms/PGOProfile/macho.ll [deleted file]

index ef49684..90d4ba0 100644 (file)
@@ -775,7 +775,7 @@ static void createIRLevelProfileFlagVariable(Module &M) {
   IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility);
   Triple TT(M.getTargetTriple());
   if (TT.isOSBinFormatMachO())
-    IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceAnyLinkage);
+    IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceODRLinkage);
   else
     IRLevelVersionVariable->setComdat(M.getOrInsertComdat(
         StringRef(INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR))));
diff --git a/test/Transforms/PGOProfile/macho.ll b/test/Transforms/PGOProfile/macho.ll
deleted file mode 100644 (file)
index d2fe65f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: opt < %s -pgo-instr-gen -instrprof -S | llc | FileCheck %s --check-prefix=MACHO-DIRECTIVE
-
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.11.0"
-
-; MACHO-DIRECTIVE: .weak_definition        ___llvm_profile_raw_version
-define i32 @test_macho(i32 %i) {
-entry:
-  ret i32 %i
-}