diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-07-21 16:59:53 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-07-21 16:59:53 +0000 |
commit | 6ede37442d263084bc48d6a8e9c9c728c44f583b (patch) | |
tree | 5a24007d18fac4edfedb8edb01f23b2ce895fb47 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 74ce2e76919bc17ff32c4ba941080732800c35fa (diff) | |
download | llvm-6ede37442d263084bc48d6a8e9c9c728c44f583b.zip llvm-6ede37442d263084bc48d6a8e9c9c728c44f583b.tar.gz llvm-6ede37442d263084bc48d6a8e9c9c728c44f583b.tar.bz2 |
MIR Serialization: Serialize the external symbol machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242806
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 9856e70..0a8309e 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<char>(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()); |