aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-12-10 02:21:04 +0000
committerAnders Carlsson <andersca@mac.com>2008-12-10 02:21:04 +0000
commit565c99f45e758406f26404e92fadd15d8b84a8c4 (patch)
tree79b3fe5e93625020eb41c927b49dc55d4a3ad6ba /lib/CodeGen/CGObjCMac.cpp
parent4dc506cbbc113c0655c482bc3b9e5f094d6e7417 (diff)
Append an extra newline to the module inline asm if it's not empty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 67f6559938..013b0f9cc3 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -2189,6 +2189,10 @@ void CGObjCMac::FinishModule() {
// FIXME: Uh, this isn't particularly portable.
std::stringstream s;
+
+ if (!CGM.getModule().getModuleInlineAsm().empty())
+ s << "\n";
+
for (std::set<IdentifierInfo*>::iterator i = LazySymbols.begin(),
e = LazySymbols.end(); i != e; ++i) {
s << "\t.lazy_reference .objc_class_name_" << (*i)->getName() << "\n";
@@ -2198,6 +2202,7 @@ void CGObjCMac::FinishModule() {
s << "\t.objc_class_name_" << (*i)->getName() << "=0\n"
<< "\t.globl .objc_class_name_" << (*i)->getName() << "\n";
}
+
CGM.getModule().appendModuleInlineAsm(s.str());
}