Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang-tools-extra/clangd/CompileCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ std::optional<std::string> detectSysroot() {

std::string detectStandardResourceDir() {
static int StaticForMainAddr; // Just an address in this process.
return GetResourcesPath("clangd", (void *)&StaticForMainAddr);
return CompilerInvocation::GetResourcesPath("clangd",
(void *)&StaticForMainAddr);
}

// The path passed to argv[0] is important:
Expand Down
1 change: 0 additions & 1 deletion clang-tools-extra/clangd/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "Compiler.h"
#include "support/Logger.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Driver/CreateInvocationFromArgs.h"
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Serialization/PCHContainerOperations.h"
Expand Down
2 changes: 0 additions & 2 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ Potentially Breaking Changes
- Downstream projects that previously linked only against ``clangDriver`` may
now (also) need to link against the new ``clangOptions`` library, since
options-related code has been moved out of the Driver into a separate library.
- The ``clangFrontend`` library no longer depends on ``clangDriver``, which may
break downstream projects that relied on this transitive dependency.

C/C++ Language Potentially Breaking Changes
-------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions clang/include/clang/Driver/CommonArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@ void handleVectorizeLoopsArgs(const llvm::opt::ArgList &Args,
void handleVectorizeSLPArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs);

// Parse -mprefer-vector-width=. Return the Value string if well-formed.
// Otherwise, return an empty string and issue a diagnosic message if needed.
StringRef parseMPreferVectorWidthOption(clang::DiagnosticsEngine &Diags,
const llvm::opt::ArgList &Args);

// Parse -mrecip. Return the Value string if well-formed.
// Otherwise, return an empty string and issue a diagnosic message if needed.
StringRef parseMRecipOption(clang::DiagnosticsEngine &Diags,
const llvm::opt::ArgList &Args);

// Convert ComplexRangeKind to a string that can be passed as a frontend option.
std::string complexRangeKindToStr(LangOptions::ComplexRangeKind Range);

Expand Down
80 changes: 0 additions & 80 deletions clang/include/clang/Driver/CreateASTUnitFromArgs.h

This file was deleted.

76 changes: 0 additions & 76 deletions clang/include/clang/Driver/CreateInvocationFromArgs.h

This file was deleted.

4 changes: 4 additions & 0 deletions clang/include/clang/Driver/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ class Driver {
SmallString<128> &CrashDiagDir);

public:
/// Takes the path to a binary that's either in bin/ or lib/ and returns
/// the path to clang's resource directory.
static std::string GetResourcesPath(StringRef BinaryPath);

Driver(StringRef ClangExecutable, StringRef TargetTriple,
DiagnosticsEngine &Diags, std::string Title = "clang LLVM compiler",
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr);
Expand Down
Loading
Loading