diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-11 13:33:18 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-11 13:33:18 +0000 |
commit | 8d04258483be6583f0865464234d014807a3e1cc (patch) | |
tree | e7d61784d17984d6963d15d89fc5f5955b5a7344 /lib/CodeGen/CodeGenModule.cpp | |
parent | 330358056acf05445273f4f4004dfd283a2ecc4d (diff) |
Random string-related cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 3a0d2b8ddc..660dd6cc3e 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1689,14 +1689,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { case Decl::FileScopeAsm: { FileScopeAsmDecl *AD = cast<FileScopeAsmDecl>(D); - std::string AsmString(AD->getAsmString()->getStrData(), - AD->getAsmString()->getByteLength()); + llvm::StringRef AsmString = AD->getAsmString()->getString(); const std::string &S = getModule().getModuleInlineAsm(); if (S.empty()) getModule().setModuleInlineAsm(AsmString); else - getModule().setModuleInlineAsm(S + '\n' + AsmString); + getModule().setModuleInlineAsm(S + '\n' + AsmString.str()); break; } |