Importing rustc-1.47.0

Bug: 171280890
Change-Id: Iac01e5c09a6ae8e508762cd96c2a88d191af4f0e
diff --git a/src/llvm-project/llvm/utils/TableGen/ExegesisEmitter.cpp b/src/llvm-project/llvm/utils/TableGen/ExegesisEmitter.cpp
index 976d5f5..8f784e4 100644
--- a/src/llvm-project/llvm/utils/TableGen/ExegesisEmitter.cpp
+++ b/src/llvm-project/llvm/utils/TableGen/ExegesisEmitter.cpp
@@ -101,7 +101,7 @@
     PrintFatalError("ERROR: No 'Target' subclasses defined!");
   if (Targets.size() != 1)
     PrintFatalError("ERROR: Multiple subclasses of Target defined!");
-  Target = Targets[0]->getName();
+  Target = std::string(Targets[0]->getName());
 }
 
 void ExegesisEmitter::emitPfmCountersInfo(const Record &Def,