diff options
author | emaste <emaste@FreeBSD.org> | 2013-08-24 10:06:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-08-24 10:06:51 +0000 |
commit | 7b3e1df40ac9ce8daaa5d38c3a682c2da612b045 (patch) | |
tree | 4aadcf7bae3a4065b9fa55a80d7e60e9d69e01a9 /contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp | |
parent | 739c3b84b86418bdb2db51451452bd5b0c568538 (diff) | |
download | FreeBSD-src-7b3e1df40ac9ce8daaa5d38c3a682c2da612b045.zip FreeBSD-src-7b3e1df40ac9ce8daaa5d38c3a682c2da612b045.tar.gz |
Revert lldb changes due to post-3.3 clang and llvm API changes
Revisions:
svn git
183929 99447a6
183862 15c1774
source/Host/common/FileSpec.cpp
184954 007e7bc
184948 4dc3761
source/Expression/ClangExpressionParser.cpp
182099 b31044e
181387 779e6ac
include/lldb/Expression/IRExecutionUnit.h
source/Expression/IRExecutionUnit.cpp
184177 0b2934b
182650 f2dcf35
181703 7bef4e2
source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
182683 0d91b80
source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp index 98c0bfd..d026f2f 100644 --- a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp +++ b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp @@ -52,7 +52,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/FileSystem.h" +#include "llvm/Support/PathV1.h" #include "llvm/Support/TargetSelect.h" #if defined(__FreeBSD__) @@ -81,16 +81,19 @@ using namespace lldb_private; //===----------------------------------------------------------------------===// std::string GetBuiltinIncludePath(const char *Argv0) { - SmallString<128> P(llvm::sys::fs::getMainExecutable( - Argv0, (void *)(intptr_t) GetBuiltinIncludePath)); - - if (!P.empty()) { - llvm::sys::path::remove_filename(P); // Remove /clang from foo/bin/clang - llvm::sys::path::remove_filename(P); // Remove /bin from foo/bin - + llvm::sys::Path P = + llvm::sys::Path::GetMainExecutable(Argv0, + (void*)(intptr_t) GetBuiltinIncludePath); + + if (!P.isEmpty()) { + P.eraseComponent(); // Remove /clang from foo/bin/clang + P.eraseComponent(); // Remove /bin from foo/bin + // Get foo/lib/clang/<version>/include - llvm::sys::path::append(P, "lib", "clang", CLANG_VERSION_STRING, - "include"); + P.appendComponent("lib"); + P.appendComponent("clang"); + P.appendComponent(CLANG_VERSION_STRING); + P.appendComponent("include"); } return P.str(); |