Skip to content

Commit b350d68

Browse files
committed
Fix build failure after "ArrayRef'ized CompilerInvocation::CreateFromArgs"
llvm/llvm-project@1fac68b
1 parent 812eb74 commit b350d68

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

common_clang.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
247247

248248
// Create compiler invocation from user args before trickering with it
249249
clang::CompilerInvocation::CreateFromArgs(compiler->getInvocation(),
250-
optionsParser.beginArgs(),
251-
optionsParser.endArgs(), *Diags);
250+
optionsParser.args(), *Diags);
252251

253252
// Configure our handling of diagnostics.
254253
ProcessWarningOptions(*Diags, compiler->getDiagnosticOpts());

options.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Copyright (c) Intel Corporation (2009-2017).
2222
#define COMMON_CLANG_OPTIONS_H
2323

2424
#include "llvm/Option/Arg.h"
25+
#include "llvm/ADT/ArrayRef.h"
2526
#include "llvm/ADT/StringRef.h"
2627
#include "llvm/Option/ArgList.h"
2728
#include "llvm/Option/Option.h"
@@ -167,6 +168,10 @@ class CompileOptionsParser {
167168
return beginArgs() + m_effectiveArgsRaw.size();
168169
}
169170

171+
llvm::ArrayRef<const char *> args() {
172+
return m_effectiveArgsRaw;
173+
}
174+
170175
std::string getEffectiveOptionsAsString() const;
171176

172177
bool hasEmitSPIRV() const { return m_emitSPIRV; }

0 commit comments

Comments
 (0)