[Lldb-commits] [PATCH] D17266: delete unused function in ClangExpressionParser`

Luke Drummond via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 15 05:24:43 PST 2016


ldrumm created this revision.
ldrumm added reviewers: clayborg, spyffe, jingham.
ldrumm added a subscriber: lldb-commits.

[git 65dafa83] introduced the `GetBuiltinIncludePath` function copied from [cfe/lib/Driver/CC1Options.cpp](http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CC1Options.cpp?view=markup&pathrev=90090#l378#)

This function is no longer used in lldb's expression parser and I believe it is safe to remove it.

http://reviews.llvm.org/D17266

Files:
  source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===================================================================
--- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -87,21 +87,6 @@
 // Utility Methods for Clang
 //===----------------------------------------------------------------------===//
 
-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
-
-        // Get foo/lib/clang/<version>/include
-        llvm::sys::path::append(P, "lib", "clang", CLANG_VERSION_STRING,
-                                "include");
-    }
-
-    return P.str();
-}
 
 class ClangExpressionParser::LLDBPreprocessorCallbacks : public PPCallbacks
 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17266.47980.patch
Type: text/x-patch
Size: 1049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160215/24985413/attachment.bin>


More information about the lldb-commits mailing list