forked from OSchip/llvm-project
Tweak the way appendModuleInlineAsm works, so you aren't obliged
to append a newline when using setModuleInlineAsm in case later someone calls appendModuleInlineAsm - make newline handling fully automatic. In case anyone is wondering there is only one user of appendModuleInlineAsm: the dragonegg plugin. llvm-svn: 94539
This commit is contained in:
parent
aec063332e
commit
de018dcfad
|
@ -211,11 +211,13 @@ public:
|
|||
/// Set the module-scope inline assembly blocks.
|
||||
void setModuleInlineAsm(StringRef Asm) { GlobalScopeAsm = Asm; }
|
||||
|
||||
/// Append to the module-scope inline assembly blocks, automatically
|
||||
/// appending a newline to the end.
|
||||
/// Append to the module-scope inline assembly blocks, automatically inserting
|
||||
/// a separating newline if necessary.
|
||||
void appendModuleInlineAsm(StringRef Asm) {
|
||||
GlobalScopeAsm += Asm;
|
||||
if (!GlobalScopeAsm.empty() &&
|
||||
GlobalScopeAsm[GlobalScopeAsm.size()-1] != '\n')
|
||||
GlobalScopeAsm += '\n';
|
||||
GlobalScopeAsm += Asm;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
|
Loading…
Reference in New Issue