diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-07 01:18:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-07 01:18:48 +0000 |
commit | 2236c20f5a5a5ae4dda7cf6bcf51f3644a221915 (patch) | |
tree | 5724368f3b3cda7c6d77e65358b114fb86cc5c18 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 1ef75e55b9402e1ac5e105fc0299a01eba09304b (diff) | |
download | bcm5719-llvm-2236c20f5a5a5ae4dda7cf6bcf51f3644a221915.tar.gz bcm5719-llvm-2236c20f5a5a5ae4dda7cf6bcf51f3644a221915.zip |
Be a little more permissive with -fmodules-ignore-macro= by removing everything after the second '=' if it is there.
llvm-svn: 174567
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 356bf3171cc..0c5a1fa70aa 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -754,13 +754,8 @@ namespace { : HSOpts(HSOpts) { } bool operator()(const std::pair<std::string, bool> &def) const { - // Dig out the macro name. - StringRef MacroName = def.first; - StringRef::size_type EqPos = MacroName.find('='); - if (EqPos != StringRef::npos) - MacroName = MacroName.substr(0, EqPos); - - return HSOpts.ModulesIgnoreMacros.count(MacroName) > 0; + StringRef MacroDef = def.first; + return HSOpts.ModulesIgnoreMacros.count(MacroDef.split('=').first) > 0; } }; } |