aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-07-21 16:59:53 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-07-21 16:59:53 +0000
commit6ede37442d263084bc48d6a8e9c9c728c44f583b (patch)
tree5a24007d18fac4edfedb8edb01f23b2ce895fb47 /llvm/lib/CodeGen/MachineFunction.cpp
parent74ce2e76919bc17ff32c4ba941080732800c35fa (diff)
downloadllvm-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.cpp7
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());