]> granicus.if.org Git - clang/commitdiff
Append an extra newline to the module inline asm if it's not empty.
authorAnders Carlsson <andersca@mac.com>
Wed, 10 Dec 2008 02:21:04 +0000 (02:21 +0000)
committerAnders Carlsson <andersca@mac.com>
Wed, 10 Dec 2008 02:21:04 +0000 (02:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60827 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 67f6559938854a9bee405fc9cdd39b61bd052bb3..013b0f9cc3e0cfb6e8b9684374db2e1fa0bab930 100644 (file)
@@ -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());
 }