From 6ede37442d263084bc48d6a8e9c9c728c44f583b Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Tue, 21 Jul 2015 16:59:53 +0000 Subject: MIR Serialization: Serialize the external symbol machine operands. Reviewers: Duncan P. N. Exon Smith llvm-svn: 242806 --- llvm/lib/CodeGen/MachineFunction.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 9856e70edae..0a8309eb2f2 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -322,6 +322,13 @@ MachineFunction::extractStoreMemRefs(MachineInstr::mmo_iterator Begin, return std::make_pair(Result, Result + Num); } +const char *MachineFunction::createExternalSymbolName(StringRef Name) { + char *Dest = Allocator.Allocate(Name.size() + 1); + std::copy(Name.begin(), Name.end(), Dest); + Dest[Name.size()] = 0; + return Dest; +} + #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) void MachineFunction::dump() const { print(dbgs()); -- cgit v1.2.3