File llvm11-fix.patch of Package autofdo

From a6471bffb0ce44524854b4237a3bcd671ad31674 Mon Sep 17 00:00:00 2001
From: Ruijie Fang <ruijief@princeton.edu>
Date: Sun, 21 Jun 2020 00:04:42 -0400
Subject: [PATCH] Fix build error for LLVM11

---
 llvm_profile_writer.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm_profile_writer.cc b/llvm_profile_writer.cc
index 1431e9f..8845cab 100644
--- a/llvm_profile_writer.cc
+++ b/llvm_profile_writer.cc
@@ -94,7 +94,8 @@ void LLVMProfileBuilder::VisitCallsite(const Callsite &callsite) {
     inline_stack_.pop_back();
   }
   auto &caller_profile = *(inline_stack_.back());
-  auto CalleeName = GetNameRef(Symbol::Name(callsite.second));
+  auto CalleeName = 
+    std::__cxx11::basic_string<char>(GetNameRef(Symbol::Name(callsite.second)).str());
   auto &callee_profile =
       caller_profile.functionSamplesAt(llvm::sampleprof::LineLocation(
           line, discriminator))[CalleeName];
openSUSE Build Service is sponsored by