about summary refs log tree commit diff homepage
path: root/lib/Basic
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2017-10-10 14:52:57 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-24 14:08:27 +0100
commitaf65ed5d61cfc98468fcdd824d841fd5ad8ed70a (patch)
treeaf21635968e1900697c63b0b8eaa3511646faec5 /lib/Basic
parenta0cd85b41f02ce5c476612eec182aa1ff3e6fe2b (diff)
downloadklee-af65ed5d61cfc98468fcdd824d841fd5ad8ed70a.tar.gz
llvm37: handle getRegisteredOptions
In LLVM 3.7 and later, getRegisteredOptions takes no arguments and
returns the map directly.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/CmdLineOptions.cpp4
1 files changed, 4 insertions, 0 deletions
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<cl::Option *> &map = cl::getRegisteredOptions();
+#else
   StringMap<cl::Option *> map;
   cl::getRegisteredOptions(map);
+#endif
   for (StringMap<cl::Option *>::iterator i = map.begin(), e = map.end(); i != e;
        i++) {
     if (i->second->Category != &Category) {