mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
include-what-you-use: rebuild for llvm10
This commit is contained in:
parent
ac2a70e5d2
commit
2e19cab18c
2 changed files with 62 additions and 1 deletions
61
srcpkgs/include-what-you-use/patches/llvm10.patch
Normal file
61
srcpkgs/include-what-you-use/patches/llvm10.patch
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
--- iwyu_driver.cc
|
||||||
|
+++ iwyu_driver.cc
|
||||||
|
@@ -205,11 +205,8 @@ CompilerInstance* CreateCompilerInstance(int argc, const char **argv) {
|
||||||
|
|
||||||
|
// Initialize a compiler invocation object from the clang (-cc1) arguments.
|
||||||
|
const ArgStringList &cc_arguments = command.getArguments();
|
||||||
|
- const char** args_start = const_cast<const char**>(cc_arguments.data());
|
||||||
|
- const char** args_end = args_start + cc_arguments.size();
|
||||||
|
std::shared_ptr<CompilerInvocation> invocation(new CompilerInvocation);
|
||||||
|
- CompilerInvocation::CreateFromArgs(*invocation,
|
||||||
|
- args_start, args_end, diagnostics);
|
||||||
|
+ CompilerInvocation::CreateFromArgs(*invocation, cc_arguments, diagnostics);
|
||||||
|
invocation->getFrontendOpts().DisableFree = false;
|
||||||
|
|
||||||
|
// Use libc++ headers bundled with Xcode.app on macOS.
|
||||||
|
--- iwyu_preprocessor.cc
|
||||||
|
+++ iwyu_preprocessor.cc
|
||||||
|
@@ -34,6 +34,7 @@
|
||||||
|
#include "clang/Lex/MacroInfo.h"
|
||||||
|
|
||||||
|
using clang::FileEntry;
|
||||||
|
+using clang::FileEntryRef;
|
||||||
|
using clang::FileID;
|
||||||
|
using clang::MacroDefinition;
|
||||||
|
using clang::MacroDirective;
|
||||||
|
@@ -694,7 +695,7 @@ void IwyuPreprocessorInfo::FileChanged(SourceLocation loc,
|
||||||
|
// Called when we see an #include, but decide we don't need to
|
||||||
|
// actually read it because it's already been #included (and is
|
||||||
|
// protected by a header guard).
|
||||||
|
-void IwyuPreprocessorInfo::FileSkipped(const FileEntry& file,
|
||||||
|
+void IwyuPreprocessorInfo::FileSkipped(const FileEntryRef& file,
|
||||||
|
const Token &filename,
|
||||||
|
SrcMgr::CharacteristicKind file_type) {
|
||||||
|
CHECK_(include_filename_loc_.isValid() &&
|
||||||
|
@@ -705,11 +706,11 @@ void IwyuPreprocessorInfo::FileSkipped(const FileEntry& file,
|
||||||
|
GetInstantiationLoc(filename.getLocation());
|
||||||
|
ERRSYM(GetFileEntry(include_loc))
|
||||||
|
<< "[ (#include) ] " << include_name_as_written
|
||||||
|
- << " (" << GetFilePath(&file) << ")\n";
|
||||||
|
+ << " (" << GetFilePath(&file.getFileEntry()) << ")\n";
|
||||||
|
|
||||||
|
- AddDirectInclude(include_loc, &file, include_name_as_written);
|
||||||
|
- if (ShouldReportIWYUViolationsFor(&file)) {
|
||||||
|
- files_to_report_iwyu_violations_for_.insert(&file);
|
||||||
|
+ AddDirectInclude(include_loc, &file.getFileEntry(), include_name_as_written);
|
||||||
|
+ if (ShouldReportIWYUViolationsFor(&file.getFileEntry())) {
|
||||||
|
+ files_to_report_iwyu_violations_for_.insert(&file.getFileEntry());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- iwyu_preprocessor.h
|
||||||
|
+++ iwyu_preprocessor.h
|
||||||
|
@@ -204,7 +204,7 @@ class IwyuPreprocessorInfo : public clang::PPCallbacks,
|
||||||
|
void FileChanged(clang::SourceLocation loc, FileChangeReason reason,
|
||||||
|
clang::SrcMgr::CharacteristicKind file_type,
|
||||||
|
clang::FileID exiting_from_id) override;
|
||||||
|
- void FileSkipped(const clang::FileEntry& file, const clang::Token &filename,
|
||||||
|
+ void FileSkipped(const clang::FileEntryRef& file, const clang::Token &filename,
|
||||||
|
clang::SrcMgr::CharacteristicKind file_type) override;
|
||||||
|
// FileChanged is actually a multi-plexer for 4 different callbacks.
|
||||||
|
void FileChanged_EnterFile(clang::SourceLocation file_beginning);
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'include-what-you-use'
|
# Template file for 'include-what-you-use'
|
||||||
pkgname=include-what-you-use
|
pkgname=include-what-you-use
|
||||||
version=0.13
|
version=0.13
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="${pkgname}"
|
wrksrc="${pkgname}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DIWYU_LLVM_ROOT_PATH=${XBPS_CROSS_BASE}/usr "
|
configure_args="-DIWYU_LLVM_ROOT_PATH=${XBPS_CROSS_BASE}/usr "
|
||||||
|
|
Loading…
Add table
Reference in a new issue