From: Richard Smith Date: Wed, 29 Apr 2015 23:46:48 +0000 (+0000) Subject: Fix build after Clang API change in r236176. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63a41277fe4764bac27aa9276d0343c6104930a2;p=platform%2Fupstream%2Fllvm.git Fix build after Clang API change in r236176. llvm-svn: 236182 --- diff --git a/lldb/source/Expression/ClangModulesDeclVendor.cpp b/lldb/source/Expression/ClangModulesDeclVendor.cpp index b4316a9..46864c6 100644 --- a/lldb/source/Expression/ClangModulesDeclVendor.cpp +++ b/lldb/source/Expression/ClangModulesDeclVendor.cpp @@ -446,23 +446,16 @@ ClangModulesDeclVendorImpl::ForEachMacro(const ClangModulesDeclVendor::ModuleVec ssize_t found_priority = -1; clang::MacroInfo *info = nullptr; - for (clang::MacroDirective *directive = m_compiler_instance->getPreprocessor().getMacroDirectiveHistory(ii); - directive != nullptr; - directive = directive->getPrevious()) + for (clang::ModuleMacro *macro : m_compiler_instance->getPreprocessor().getMacroDefinition(ii).getModuleMacros()) { - unsigned module_id = directive->getMacroInfo()->getOwningModuleID(); - - if (!module_id) - continue; - - clang::Module *module = m_compiler_instance->getModuleManager()->getModule(module_id); + clang::Module *module = macro->getOwningModule(); { ModulePriorityMap::iterator pi = module_priorities.find(reinterpret_cast(module)); if (pi != module_priorities.end() && pi->second > found_priority) { - info = directive->getMacroInfo(); + info = macro->getMacroInfo(); found_priority = pi->second; } } @@ -475,7 +468,7 @@ ClangModulesDeclVendorImpl::ForEachMacro(const ClangModulesDeclVendor::ModuleVec if ((pi != module_priorities.end()) && pi->second > found_priority) { - info = directive->getMacroInfo(); + info = macro->getMacroInfo(); found_priority = pi->second; } }