Skip to content

Commit

Permalink
Improve wording of newline handling.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232195 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jsonn committed Mar 13, 2015
1 parent e83badb commit 99db0c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/llvm/IR/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,16 @@ class Module {
void setTargetTriple(StringRef T) { TargetTriple = T; }

/// Set the module-scope inline assembly blocks.
/// A trailing newline is added if the input doesn't have one.
void setModuleInlineAsm(StringRef Asm) {
GlobalScopeAsm = Asm;
if (!GlobalScopeAsm.empty() &&
GlobalScopeAsm[GlobalScopeAsm.size()-1] != '\n')
GlobalScopeAsm += '\n';
}

/// Append to the module-scope inline assembly blocks, automatically inserting
/// a separating newline if necessary.
/// Append to the module-scope inline assembly blocks.
/// A trailing newline is added if the input doesn't have one.
void appendModuleInlineAsm(StringRef Asm) {
GlobalScopeAsm += Asm;
if (!GlobalScopeAsm.empty() &&
Expand Down

0 comments on commit 99db0c8

Please sign in to comment.