aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-15 18:54:56 +0000
committerChris Lattner <sabre@nondot.org>2008-02-15 18:54:56 +0000
commit705da966979426f9b0151498df2335bdb149fa41 (patch)
tree986114b8e77ba4ad759742659dddb4a6a62454f2
parent3b407444c9a45feb74b70b43138580d5f0299597 (diff)
targets that support quotes for mangled names still need to escape newlines
when they occur in the name, just like " is escaped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47169 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Mangler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index 777e5b51ee..7448e7de44 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -96,6 +96,8 @@ std::string Mangler::makeNameProper(const std::string &X, const char *Prefix) {
for (std::string::const_iterator E = X.end(); I != E; ++I) {
if (*I == '"')
Result += "_QQ_";
+ else if (*I == '\n')
+ Result += "_NL_";
else
Result += *I;
}