Skip to content

Commit

Permalink
Fix build failure after "ArrayRef'ized CompilerInvocation::CreateFrom…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySotkin committed Sep 12, 2019
1 parent 439235d commit c563640
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions common_clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,

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

// Configure our handling of diagnostics.
ProcessWarningOptions(*Diags, compiler->getDiagnosticOpts());
Expand Down
5 changes: 5 additions & 0 deletions options.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Copyright (c) Intel Corporation (2009-2017).
#define COMMON_CLANG_OPTIONS_H

#include "llvm/Option/Arg.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
Expand Down Expand Up @@ -167,6 +168,10 @@ class CompileOptionsParser {
return beginArgs() + m_effectiveArgsRaw.size();
}

llvm::ArrayRef<const char *> args() {
return m_effectiveArgsRaw;
}

std::string getEffectiveOptionsAsString() const;

bool hasEmitSPIRV() const { return m_emitSPIRV; }
Expand Down

0 comments on commit c563640

Please sign in to comment.