From b11118bd0b02bb4cbb6c59c9c213c22d8cd34bab Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 11 Dec 2009 13:33:18 +0000 Subject: Random string-related cleanups. llvm-svn: 91119 --- clang/lib/CodeGen/CodeGenModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 3a0d2b8ddcb7..660dd6cc3eb5 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1689,14 +1689,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { case Decl::FileScopeAsm: { FileScopeAsmDecl *AD = cast(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; } -- cgit v1.2.3