aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-12-08 01:46:24 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-12-08 01:46:24 +0000
commite3fdca2ee0346a41d9cc5ee417a75e66274216f5 (patch)
tree172f10b3abd6d014f26fb0adb303e6137e54aeca /lib
parentb2debeb96da2b1d47ecffddbc35ade97b64af1c2 (diff)
Remove several .c_str() to be forward-compatible with StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
-rw-r--r--lib/Driver/Driver.cpp6
-rw-r--r--lib/Frontend/ASTUnit.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 2b823e0abb..56ee63f098 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -137,8 +137,8 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) {
// Create new compile unit.
return Unit = DebugFactory.CreateCompileUnit(LangTag,
- AbsFileName.getLast().c_str(),
- AbsFileName.getDirname().c_str(),
+ AbsFileName.getLast(),
+ AbsFileName.getDirname(),
Producer.c_str(), isMain,
isOptimized, Flags, RuntimeVers);
}
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 7f7affbdb4..dbe7bd9b68 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -41,9 +41,9 @@ using namespace clang;
// Used to set values for "production" clang, for releases.
// #define USE_PRODUCTION_CLANG
-Driver::Driver(const char *_Name, const char *_Dir,
- const char *_DefaultHostTriple,
- const char *_DefaultImageName,
+Driver::Driver(llvm::StringRef _Name, llvm::StringRef _Dir,
+ llvm::StringRef _DefaultHostTriple,
+ llvm::StringRef _DefaultImageName,
bool IsProduction, Diagnostic &_Diags)
: Opts(createDriverOptTable()), Diags(_Diags),
Name(_Name), Dir(_Dir), DefaultHostTriple(_DefaultHostTriple),
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 8c2731b895..8f66d4c166 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -300,8 +300,8 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
Args.push_back("-fsyntax-only");
llvm::sys::Path Path = llvm::sys::Path::GetMainExecutable(Argv0, MainAddr);
- driver::Driver TheDriver(Path.getBasename().c_str(),Path.getDirname().c_str(),
- llvm::sys::getHostTriple().c_str(),
+ driver::Driver TheDriver(Path.getBasename(), Path.getDirname(),
+ llvm::sys::getHostTriple(),
"a.out", false, Diags);
llvm::OwningPtr<driver::Compilation> C(
TheDriver.BuildCompilation(Args.size(), Args.data()));