Add a convenince member function for appending strings to a module's
authorDan Gohman <gohman@apple.com>
Tue, 26 Jun 2007 00:38:49 +0000 (00:38 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 26 Jun 2007 00:38:49 +0000 (00:38 +0000)
module-level asm string data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37726 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Module.h

index 8cd35f25becde90d34897d7a8decca8be087ad3e..9bd02ec50ff7f7301583e51e2150b0d9b4a7993a 100644 (file)
@@ -174,6 +174,13 @@ public:
   /// Set the module-scope inline assembly blocks.
   void setModuleInlineAsm(const std::string &Asm) { GlobalScopeAsm = Asm; }
   
+  /// Append to the module-scope inline assembly blocks, automatically
+  /// appending a newline to the end.
+  void appendModuleInlineAsm(const std::string &Asm) {
+    GlobalScopeAsm += Asm;
+    GlobalScopeAsm += '\n';
+  }
+  
 /// @}
 /// @name Function Accessors
 /// @{