Simplify.

llvm-svn: 232130
This commit is contained in:
Joerg Sonnenberger 2015-03-13 00:54:30 +00:00
parent ef9e01eada
commit dfd511e9bc
1 changed files with 1 additions and 9 deletions

View File

@ -3360,15 +3360,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::FileScopeAsm: {
auto *AD = cast<FileScopeAsmDecl>(D);
StringRef AsmString = AD->getAsmString()->getString();
const std::string &S = getModule().getModuleInlineAsm();
if (S.empty())
getModule().setModuleInlineAsm(AsmString);
else if (S.end()[-1] == '\n')
getModule().setModuleInlineAsm(S + AsmString.str());
else
getModule().setModuleInlineAsm(S + '\n' + AsmString.str());
getModule().appendModuleInlineAsm(AD->getAsmString()->getString());
break;
}