diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-08 11:02:29 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-08 11:02:29 +0000 |
| commit | 1d20564b8dba44c84fbd1e4ed043240de64ced0b (patch) | |
| tree | e99a4a29a32161bcb5761b785df5ab00cbc711a3 | |
| parent | 6a3df7b0c7c29aaac8c7c36ee284d95d3aaf5537 (diff) | |
| download | bcm5719-llvm-1d20564b8dba44c84fbd1e4ed043240de64ced0b.tar.gz bcm5719-llvm-1d20564b8dba44c84fbd1e4ed043240de64ced0b.zip | |
Use Path.makeAbsolute() and make a constant std::string a const char*.
llvm-svn: 90851
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 56ee63f098c..197c145c67c 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -84,11 +84,7 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { // Get absolute path name. llvm::sys::Path AbsFileName(FileName); - if (!AbsFileName.isAbsolute()) { - llvm::sys::Path tmp = llvm::sys::Path::GetCurrentDirectory(); - tmp.appendComponent(FileName); - AbsFileName = tmp; - } + AbsFileName.makeAbsolute(); // See if thie compile unit is representing main source file. Each source // file has corresponding compile unit. There is only one main source @@ -122,7 +118,7 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { LangTag = llvm::dwarf::DW_LANG_C89; } - std::string Producer = + const char *Producer = #ifdef CLANG_VENDOR CLANG_VENDOR #endif @@ -139,7 +135,7 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { return Unit = DebugFactory.CreateCompileUnit(LangTag, AbsFileName.getLast(), AbsFileName.getDirname(), - Producer.c_str(), isMain, + Producer, isMain, isOptimized, Flags, RuntimeVers); } |

