Do not re-register plugin pragmas.

The clang::Preprocessor::RegisterBuiltinPragmas already registered them

This patch avoids an assertion when re-adding the same pragma twice.
This commit is contained in:
Vassil Vassilev 2018-11-05 09:51:27 +01:00 committed by sftnight
parent fc33c22f45
commit 13cbf38ae0

View File

@ -218,14 +218,6 @@ static void HandlePlugins(CompilerInstance& CI,
Consumers.push_back(std::move(PluginConsumer));
}
}
// Copied from Lex/Pragma.cpp
// Pragmas added by plugins
for (PragmaHandlerRegistry::iterator it = PragmaHandlerRegistry::begin(),
ie = PragmaHandlerRegistry::end(); it != ie; ++it) {
CI.getPreprocessor().AddPragmaHandler(it->instantiate().release());
}
}
namespace cling {