Random string-related cleanups.

llvm-svn: 91119
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 692dea6..24e3ffd 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -479,10 +479,9 @@
   const llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType(FI, false);
   llvm::Function *Fn =
     llvm::Function::Create(FTy, llvm::GlobalValue::InternalLinkage,
-                           Name.c_str(),
+                           Name.str(),
                            &CGM.getModule());
-  IdentifierInfo *II
-    = &CGM.getContext().Idents.get(Name.c_str());
+  IdentifierInfo *II = &CGM.getContext().Idents.get(Name.str());
   FunctionDecl *FD = FunctionDecl::Create(getContext(),
                                           getContext().getTranslationUnitDecl(),
                                           SourceLocation(), II, R, 0,
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 3a0d2b8..660dd6c 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1689,14 +1689,13 @@
 
   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;
   }