Skip to content

Commit 12e582c

Browse files
committed
merge main into amd-staging
2 parents b92350c + 1736008 commit 12e582c

File tree

73 files changed

+1131
-1018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1131
-1018
lines changed

amd/comgr/src/comgr-compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ amd_comgr_status_t AMDGPUCompiler::addDeviceLibraries() {
11291129
SmallString<256> ClangBinaryPath(env::getLLVMPath());
11301130
sys::path::append(ClangBinaryPath, "bin", "clang");
11311131

1132-
std::string ClangResourceDir = GetResourcesPath(ClangBinaryPath);
1132+
std::string ClangResourceDir = Driver::GetResourcesPath(ClangBinaryPath);
11331133

11341134
SmallString<256> DeviceLibPath(ClangResourceDir);
11351135
sys::path::append(DeviceLibPath, "lib");

clang-tools-extra/clangd/CompileCommands.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ std::optional<std::string> detectSysroot() {
132132

133133
std::string detectStandardResourceDir() {
134134
static int StaticForMainAddr; // Just an address in this process.
135-
return GetResourcesPath("clangd", (void *)&StaticForMainAddr);
135+
return CompilerInvocation::GetResourcesPath("clangd",
136+
(void *)&StaticForMainAddr);
136137
}
137138

138139
// The path passed to argv[0] is important:

clang-tools-extra/clangd/Compiler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "Compiler.h"
1010
#include "support/Logger.h"
1111
#include "clang/Basic/TargetInfo.h"
12-
#include "clang/Driver/CreateInvocationFromArgs.h"
1312
#include "clang/Frontend/CompilerInvocation.h"
1413
#include "clang/Lex/PreprocessorOptions.h"
1514
#include "clang/Serialization/PCHContainerOperations.h"

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ Potentially Breaking Changes
8484
- Downstream projects that previously linked only against ``clangDriver`` may
8585
now (also) need to link against the new ``clangOptions`` library, since
8686
options-related code has been moved out of the Driver into a separate library.
87-
- The ``clangFrontend`` library no longer depends on ``clangDriver``, which may
88-
break downstream projects that relied on this transitive dependency.
8987

9088
C/C++ Language Potentially Breaking Changes
9189
-------------------------------------------

clang/include/clang/Driver/CommonArgs.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,16 @@ void handleVectorizeLoopsArgs(const llvm::opt::ArgList &Args,
312312
void handleVectorizeSLPArgs(const llvm::opt::ArgList &Args,
313313
llvm::opt::ArgStringList &CmdArgs);
314314

315+
// Parse -mprefer-vector-width=. Return the Value string if well-formed.
316+
// Otherwise, return an empty string and issue a diagnosic message if needed.
317+
StringRef parseMPreferVectorWidthOption(clang::DiagnosticsEngine &Diags,
318+
const llvm::opt::ArgList &Args);
319+
320+
// Parse -mrecip. Return the Value string if well-formed.
321+
// Otherwise, return an empty string and issue a diagnosic message if needed.
322+
StringRef parseMRecipOption(clang::DiagnosticsEngine &Diags,
323+
const llvm::opt::ArgList &Args);
324+
315325
// Convert ComplexRangeKind to a string that can be passed as a frontend option.
316326
std::string complexRangeKindToStr(LangOptions::ComplexRangeKind Range);
317327

clang/include/clang/Driver/CreateASTUnitFromArgs.h

Lines changed: 0 additions & 80 deletions
This file was deleted.

clang/include/clang/Driver/CreateInvocationFromArgs.h

Lines changed: 0 additions & 76 deletions
This file was deleted.

clang/include/clang/Driver/Driver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ class Driver {
412412
SmallString<128> &CrashDiagDir);
413413

414414
public:
415+
/// Takes the path to a binary that's either in bin/ or lib/ and returns
416+
/// the path to clang's resource directory.
417+
static std::string GetResourcesPath(StringRef BinaryPath);
418+
415419
Driver(StringRef ClangExecutable, StringRef TargetTriple,
416420
DiagnosticsEngine &Diags, std::string Title = "clang LLVM compiler",
417421
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr);

0 commit comments

Comments
 (0)