From af65ed5d61cfc98468fcdd824d841fd5ad8ed70a Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 10 Oct 2017 14:52:57 +0200 Subject: llvm37: handle getRegisteredOptions In LLVM 3.7 and later, getRegisteredOptions takes no arguments and returns the map directly. Signed-off-by: Jiri Slaby --- lib/Basic/CmdLineOptions.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Basic/CmdLineOptions.cpp') diff --git a/lib/Basic/CmdLineOptions.cpp b/lib/Basic/CmdLineOptions.cpp index aaba72f4..3c117db9 100644 --- a/lib/Basic/CmdLineOptions.cpp +++ b/lib/Basic/CmdLineOptions.cpp @@ -86,8 +86,12 @@ UseAssignmentValidatingSolver("debug-assignment-validating-solver", cl::init(false)); void KCommandLine::HideUnrelatedOptions(cl::OptionCategory &Category) { +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7) + StringMap &map = cl::getRegisteredOptions(); +#else StringMap map; cl::getRegisteredOptions(map); +#endif for (StringMap::iterator i = map.begin(), e = map.end(); i != e; i++) { if (i->second->Category != &Category) { -- cgit 1.4.1